ci: copy node vite config from main vite config
This commit is contained in:
parent
18b0ced465
commit
cb691d4778
|
@ -1,10 +1,11 @@
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
import { svelte } from "@sveltejs/vite-plugin-svelte";
|
import { svelte } from "@sveltejs/vite-plugin-svelte";
|
||||||
import { resolve } from "path";
|
import { resolve } from "path";
|
||||||
|
import optimizer from "vite-plugin-optimizer";
|
||||||
|
import { nodePolyfills } from "vite-plugin-node-polyfills";
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [svelte()],
|
|
||||||
build: {
|
build: {
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
input: {
|
input: {
|
||||||
|
@ -13,5 +14,20 @@ export default defineConfig({
|
||||||
dashboard: resolve(__dirname, "dashboard.html"),
|
dashboard: resolve(__dirname, "dashboard.html"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
minify: false,
|
||||||
},
|
},
|
||||||
|
resolve: {
|
||||||
|
dedupe: ["@lumeweb/libportal", "@lumeweb/libweb", "@lumeweb/libkernel"],
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
svelte(),
|
||||||
|
optimizer({
|
||||||
|
"node-fetch":
|
||||||
|
"const e = undefined; export default e;export {e as Response, e as FormData, e as Blob};",
|
||||||
|
}),
|
||||||
|
nodePolyfills({
|
||||||
|
exclude: ["fs"],
|
||||||
|
globals: { Buffer: true, global: true, process: true },
|
||||||
|
}),
|
||||||
|
],
|
||||||
});
|
});
|
||||||
|
|
Reference in New Issue