ci: add vite.config.js as an actual file

This commit is contained in:
Derrick Hammer 2023-07-12 04:46:26 -04:00
parent 4669a13c49
commit c97ce30c2e
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 30 additions and 1 deletions

View File

@ -1 +0,0 @@
node_modules/presetter/generated/@lumeweb/kernel-discovery-irc/vite.config.js

30
vite.config.js Normal file
View File

@ -0,0 +1,30 @@
import { defineConfig } from "vite";
import optimizer from "vite-plugin-optimizer";
import inject from "@rollup/plugin-inject";
export default defineConfig({
build: {
outDir: "lib",
lib: {
entry: "build/index.js",
name: "main",
formats: ["cjs"],
fileName: "index",
},
minify: false,
rollupOptions: { output: { inlineDynamicImports: true } },
},
resolve: {
dedupe: ["@lumeweb/libportal", "@lumeweb/libweb", "@lumeweb/libkernel"],
alias: { tls: "./build/net.js", net: "./build/net.js" },
},
plugins: [
optimizer({
"node-fetch":
"const e = undefined; export default e;export {e as Response, e as FormData, e as Blob};",
}),
inject({
Buffer: ["buffer", "Buffer"],
}),
],
});