Skip to content

Commit be8056f

Browse files
committed
fix: Use separate snapshots for sequencer and validator workloads, update yarn lock
1 parent 519274b commit be8056f

File tree

3 files changed

+6619
-3833
lines changed

3 files changed

+6619
-3833
lines changed

report/vite.config.ts

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { defineConfig, loadEnv } from "vite";
22
import { resolve } from "path";
3+
import { existsSync } from "fs";
34
import { viteStaticCopy } from "vite-plugin-static-copy";
45
import react from "@vitejs/plugin-react";
56
import tailwindcss from "@tailwindcss/vite";
@@ -18,6 +19,29 @@ export default defineConfig(({ mode }) => {
1819
? env.VITE_ALLOWED_HOSTS.split(",").map((host) => host.trim())
1920
: ["localhost"];
2021

22+
// Check if output directory exists
23+
const outputDirPath = resolve(__dirname, "../output");
24+
const hasOutputDir = existsSync(outputDirPath);
25+
26+
// Build plugins array
27+
const plugins = [react(), tailwindcss()];
28+
29+
// Only add static copy plugin if output directory exists
30+
if (hasOutputDir) {
31+
plugins.push(
32+
viteStaticCopy({
33+
targets: [
34+
{
35+
src: "../output/**/*",
36+
dest: "output",
37+
},
38+
],
39+
})
40+
);
41+
} else {
42+
console.log("Output directory not found, skipping static copy");
43+
}
44+
2145
return {
2246
server: {
2347
port: 3000,
@@ -46,18 +70,6 @@ export default defineConfig(({ mode }) => {
4670
env: processEnvVars,
4771
}),
4872
},
49-
// assetsInclude: ['../output/**/*']
50-
plugins: [
51-
react(),
52-
tailwindcss(),
53-
viteStaticCopy({
54-
targets: [
55-
{
56-
src: "../output/**/*",
57-
dest: "output",
58-
},
59-
],
60-
}),
61-
],
73+
plugins,
6274
};
6375
});

0 commit comments

Comments
 (0)