Skip to content

Commit

Permalink
feat: add process.env.MINIFY support for build, add preserveEntrySign…
Browse files Browse the repository at this point in the history
…atures fix (fixes [Issue] Plugin is not working #44)
  • Loading branch information
nksaraf committed Dec 30, 2023
1 parent 8f4cc5b commit 5574ebe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/vinxi/lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ export async function createBuild(app, buildConfig) {
// externals: {
// inline: ["node-fetch-native/polyfill"],
// },

minify: process.env.MINIFY !== "false" ?? true,
plugins: [
"#vinxi/prod-app",
fileURLToPath(new URL("./app-fetch.js", import.meta.url)),
Expand Down Expand Up @@ -662,8 +664,10 @@ function handerBuild() {
...builtinModules.map((m) => `node:${m}`),
],
treeshake: true,
preserveEntrySignatures: "exports-only",
},
ssr: true,
minify: process.env.MINIFY !== "false" ?? true,
manifest: true,
target: "node18",
ssrEmitAssets: true,
Expand Down Expand Up @@ -694,7 +698,9 @@ function browserBuild() {
rollupOptions: {
input: await getEntries(router),
treeshake: true,
preserveEntrySignatures: "exports-only",
},
minify: process.env.MINIFY !== "false" ?? true,
manifest: true,
outDir: join(router.outDir, router.base),
target: "esnext",
Expand Down

0 comments on commit 5574ebe

Please sign in to comment.