Skip to content

Commit

Permalink
Merge pull request #69 from nksaraf/entry-sig
Browse files Browse the repository at this point in the history
feat: add process.env.MINIFY support for build, add preserveEntrySignatures fix (fixes [Issue] Plugin is not working #44)
  • Loading branch information
nksaraf authored Dec 30, 2023
2 parents 8f4cc5b + 1261c16 commit 4e1e978
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/silent-bottles-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vinxi": patch
---

feat: add process.env.MINIFY support for build, add preserveEntrySignatures fix (fixes [Issue] Plugin is not working #44)
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 4e1e978

Please sign in to comment.