@junejs/server 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/build.ts +6 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junejs/server",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "June host adapters + dev server. Host-coupled; depends on the pure @junejs/core contract layer.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,8 +30,8 @@
30
30
  "typecheck": "tsc --noEmit"
31
31
  },
32
32
  "dependencies": {
33
- "@junejs/core": "0.0.12",
34
- "@junejs/db": "0.0.12",
33
+ "@junejs/core": "0.0.13",
34
+ "@junejs/db": "0.0.13",
35
35
  "marked": "^18.0.5",
36
36
  "rolldown": "^1.1.0",
37
37
  "postcss": "^8.4.0",
package/src/build.ts CHANGED
@@ -417,6 +417,12 @@ ${adapterEntry.wrap("pipeline")}
417
417
  input: entryFile,
418
418
  cwd: appRoot,
419
419
  platform: "browser", // workerd's surface is web-standard; no node:* in the graph
420
+ // Bake NODE_ENV=production at BUILD (the same the client bundle does), so React's
421
+ // server entry folds to its production build (smaller/faster, no dev warnings) and
422
+ // the dev-only code tree-shakes. Build-time on purpose: runtime process.env.NODE_ENV
423
+ // differs by target (Vercel sets it; workerd may not), so baking it makes the output
424
+ // deterministic and target-agnostic. `june dev` doesn't use this path.
425
+ transform: { define: { "process.env.NODE_ENV": JSON.stringify("production") } },
420
426
  plugins: [rolldownCssModulesPlugin(cssModuleMaps)], // .module.css → scoped class map
421
427
  external: (id: string) => {
422
428
  // Binary assets stay external — wrangler's CompiledWasm/Data rules own them.