Lv110版本源码上传
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { builtinModules } from "node:module"
|
||||
import { defineConfig } from "vite"
|
||||
import pkg from "./package.json"
|
||||
|
||||
export default defineConfig({
|
||||
root: __dirname,
|
||||
build: {
|
||||
outDir: "../../dist/app/main",
|
||||
lib: {
|
||||
entry: "index.ts",
|
||||
formats: ["cjs"],
|
||||
fileName: () => "[name].cjs"
|
||||
},
|
||||
/* from mode option */
|
||||
minify: process.env.NODE_ENV === "production",
|
||||
/* from mode option */
|
||||
sourcemap: process.env.NODE_ENV == "development",
|
||||
rollupOptions: {
|
||||
external: ["electron",
|
||||
...builtinModules,
|
||||
...builtinModules.map((m) => `node:${m}`),
|
||||
...Object.keys(pkg.devDependencies || {})]
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user