ci: copy node vite config from main vite config

This commit is contained in:
Derrick Hammer 2023-07-18 06:45:30 -04:00
parent 18b0ced465
commit cb691d4778
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 17 additions and 1 deletions

View File

@ -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 },
}),
],
}); });