@wular/pnext 0.1.9 → 0.1.10

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 (74) hide show
  1. package/dist/server/_chunks/{aliases-fhv4dt06.js → aliases-s49gt0bb.js} +5 -5
  2. package/dist/server/_chunks/{analyze-09kx9q6r.js → analyze-c45xjea8.js} +8 -8
  3. package/dist/server/_chunks/{boot-8aj7efqk.js → boot-exjk45ry.js} +8 -8
  4. package/dist/server/_chunks/{build-jda155c9.js → build-m49fem3j.js} +4 -4
  5. package/dist/server/_chunks/{build-wspv5h60.js → build-ntq282xh.js} +46 -26
  6. package/dist/server/_chunks/{build-tier-qrkpfsk1.js → build-tier-byqfyz34.js} +17 -17
  7. package/dist/server/_chunks/{config-d4hqyygy.js → config-1hdw96je.js} +2 -2
  8. package/dist/server/_chunks/{config-7h84p6q8.js → config-m2yaayer.js} +3 -3
  9. package/dist/server/_chunks/{create-skj8wzt5.js → create-k089tdt7.js} +3 -3
  10. package/dist/server/_chunks/{dev-pennd36n.js → dev-kwp1t8b3.js} +2 -2
  11. package/dist/server/_chunks/{generate-d8vb1d21.js → generate-ap2zs26g.js} +3 -3
  12. package/dist/server/_chunks/{index-yghskk8w.js → index-0f5t5730.js} +16 -13
  13. package/dist/server/_chunks/{index-xs3411qh.js → index-1q52cw31.js} +7 -7
  14. package/dist/server/_chunks/{index-cqcwwxfp.js → index-1tmqkr6x.js} +3 -3
  15. package/dist/server/_chunks/index-1xrvw3zp.js +92 -0
  16. package/dist/server/_chunks/{index-42fef2rv.js → index-4g6amwtg.js} +2 -2
  17. package/dist/server/_chunks/{index-47gx7trn.js → index-4hspm5ez.js} +1 -1
  18. package/dist/server/_chunks/{index-s61bx2aj.js → index-56jw1658.js} +2 -2
  19. package/dist/server/_chunks/{index-xrsg0041.js → index-6w807g31.js} +12 -4
  20. package/dist/server/_chunks/{index-jjppzw0s.js → index-72wjyacg.js} +2 -2
  21. package/dist/server/_chunks/{index-n814hcky.js → index-81qnfmzz.js} +1 -1
  22. package/dist/server/_chunks/{index-vqs3rebe.js → index-8hy8qskn.js} +3 -3
  23. package/dist/server/_chunks/{index-e176wk6x.js → index-8y2yft9b.js} +1 -1
  24. package/dist/server/_chunks/{index-aarf1brn.js → index-a4asdd4j.js} +1 -1
  25. package/dist/server/_chunks/{index-53fnn598.js → index-cqft8ae4.js} +7 -7
  26. package/dist/server/_chunks/{index-6tb725m8.js → index-dd4tb5vy.js} +1 -1
  27. package/dist/server/_chunks/{index-yzcpr3yw.js → index-drfxdvvh.js} +4 -4
  28. package/dist/server/_chunks/{index-4qsce64w.js → index-e63ma63t.js} +1 -1
  29. package/dist/server/_chunks/{index-jexsy9a8.js → index-ed6rwv1x.js} +1 -1
  30. package/dist/server/_chunks/{index-kpdph69z.js → index-f76517s5.js} +23 -23
  31. package/dist/server/_chunks/{index-0wm2p3ks.js → index-fdc7wz3a.js} +1 -1
  32. package/dist/server/_chunks/{index-912z4mfx.js → index-g39z5s9d.js} +3 -3
  33. package/dist/server/_chunks/{index-y9bygr95.js → index-hw5k2sgj.js} +1 -1
  34. package/dist/server/_chunks/{index-hr63fvzn.js → index-jh486fye.js} +1 -1
  35. package/dist/server/_chunks/{index-4vf121ws.js → index-mjvq5c7e.js} +8 -8
  36. package/dist/server/_chunks/{index-0qt2vapb.js → index-mph0cmh9.js} +3 -3
  37. package/dist/server/_chunks/{index-26gwrm07.js → index-nxg8k7cg.js} +2 -2
  38. package/dist/server/_chunks/{index-3r6qpe8a.js → index-p79ck9cd.js} +4 -4
  39. package/dist/server/_chunks/{index-fpghsgb4.js → index-pshjr3qm.js} +1 -1
  40. package/dist/server/_chunks/{index-1y0cesgn.js → index-r1kzsnyp.js} +4 -4
  41. package/dist/server/_chunks/{index-veycp46e.js → index-ra6fsg5v.js} +1 -1
  42. package/dist/server/_chunks/{index-y71a76dn.js → index-tgwt3kwf.js} +4 -4
  43. package/dist/server/_chunks/{index-zedjt25v.js → index-x3cvacmf.js} +4 -4
  44. package/dist/server/_chunks/{index-qjrh7w2g.js → index-zq077xjc.js} +1 -1
  45. package/dist/server/_chunks/{index-da0fphj0.js → index-zvy5134a.js} +5 -5
  46. package/dist/server/_chunks/{loader-w1e0n5sm.js → loader-5j9bjhw7.js} +6 -6
  47. package/dist/server/_chunks/{modules-730j14cm.js → modules-gy48pdw3.js} +8 -8
  48. package/dist/server/_chunks/{pipeline-yjdnwbhm.js → pipeline-m8ac90dn.js} +11 -11
  49. package/dist/server/_chunks/{production-1xe9b7wd.js → production-26vqtxvg.js} +1 -1
  50. package/dist/server/_chunks/{proxy-pnevsbfd.js → proxy-74a1mg4v.js} +7 -7
  51. package/dist/server/_chunks/{proxy-config-9r9e0jvn.js → proxy-config-7hnexa7b.js} +5 -5
  52. package/dist/server/_chunks/{router-rzge0vz8.js → router-frkywyzb.js} +4 -4
  53. package/dist/server/_chunks/{routes-0x8wjvcj.js → routes-y7de16ja.js} +7 -7
  54. package/dist/server/_chunks/{run-tk90r3ac.js → run-q8aq4cez.js} +4 -4
  55. package/dist/server/_chunks/{server-gev78ejc.js → server-21t1fzp7.js} +19 -19
  56. package/dist/server/_chunks/{tsconfig-defaults-qe9wd6ne.js → tsconfig-defaults-bcq068bd.js} +3 -3
  57. package/dist/server/_chunks/{typegen-0yw8sry8.js → typegen-wdqj67rx.js} +10 -10
  58. package/dist/server/cli/index.js +11 -11
  59. package/dist/server/cli/start.js +5 -5
  60. package/dist/server/compat/next/config-headers.js +4 -4
  61. package/dist/server/compat/next/font/cache.js +4 -4
  62. package/dist/server/compat/next/font/local.js +5 -5
  63. package/dist/server/compat/next/font/runtime.js +5 -5
  64. package/dist/server/compat/next/navigation.js +4 -4
  65. package/dist/server/compat/next/redirects.js +4 -4
  66. package/dist/server/compat/next/rewrites.js +3 -3
  67. package/dist/server/generation.json +1 -1
  68. package/package.json +1 -1
  69. package/src/cli/adapters/vercel-warm.ts +2 -1
  70. package/src/cli/adapters/vercel.ts +37 -1
  71. package/src/cli/serve/standalone.ts +14 -6
  72. package/src/css/assets.ts +9 -1
  73. package/src/render/renderer.ts +6 -3
  74. package/dist/server/_chunks/index-md5jchzy.js +0 -92
@@ -13,10 +13,10 @@ import {
13
13
  deferredDynamicRefById,
14
14
  prebuiltRuntimeDir,
15
15
  registerDeferredDynamicRef
16
- } from "./index-53fnn598.js";
16
+ } from "./index-cqft8ae4.js";
17
17
  import {
18
18
  writeTypegen
19
- } from "./index-y71a76dn.js";
19
+ } from "./index-tgwt3kwf.js";
20
20
  import {
21
21
  handleRouteModule
22
22
  } from "./index-qpwsgt3a.js";
@@ -27,7 +27,7 @@ import {
27
27
  routeFactsVersion,
28
28
  scanRoutes,
29
29
  setRouteFactsStore
30
- } from "./index-3r6qpe8a.js";
30
+ } from "./index-p79ck9cd.js";
31
31
  import {
32
32
  clearDevRouteBundleKeys,
33
33
  devClientModuleHref,
@@ -39,7 +39,7 @@ import {
39
39
  drainPreplanBuilds,
40
40
  importDevModule,
41
41
  warmDevModulePipeline
42
- } from "./index-4vf121ws.js";
42
+ } from "./index-mjvq5c7e.js";
43
43
  import {
44
44
  getClientActionBundler
45
45
  } from "./index-n4hxpng2.js";
@@ -50,7 +50,7 @@ import {
50
50
  installServerRuntimePlugins,
51
51
  registerServerRuntime,
52
52
  setDevWatcherFreshness
53
- } from "./index-da0fphj0.js";
53
+ } from "./index-zvy5134a.js";
54
54
  import"./index-0r5eqfc7.js";
55
55
  import {
56
56
  clearMetadataFileCaches,
@@ -66,22 +66,22 @@ import {
66
66
  renderPageResponse,
67
67
  staticMetadataCacheControl,
68
68
  withDevReloadScript
69
- } from "./index-yghskk8w.js";
69
+ } from "./index-0f5t5730.js";
70
70
  import {
71
71
  findLayouts,
72
72
  matchRoute,
73
73
  parseNavState,
74
74
  selectRouteForRequest
75
- } from "./index-aarf1brn.js";
75
+ } from "./index-a4asdd4j.js";
76
76
  import {
77
77
  applyProxyResponse,
78
78
  createProxyRunner,
79
79
  validateProxyFiles
80
- } from "./index-vqs3rebe.js";
80
+ } from "./index-8hy8qskn.js";
81
81
  import {
82
82
  serverBundleTargetForRuntime
83
- } from "./index-912z4mfx.js";
84
- import"./index-42fef2rv.js";
83
+ } from "./index-g39z5s9d.js";
84
+ import"./index-4g6amwtg.js";
85
85
  import"./index-jbj7ehef.js";
86
86
  import {
87
87
  buildClientReferenceCss,
@@ -91,11 +91,11 @@ import {
91
91
  isCssFile,
92
92
  setGlobalCssSourceStore,
93
93
  warmCssPipeline
94
- } from "./index-1y0cesgn.js";
94
+ } from "./index-r1kzsnyp.js";
95
95
  import {
96
96
  formatDuration
97
97
  } from "./index-73z4esab.js";
98
- import"./index-xrsg0041.js";
98
+ import"./index-6w807g31.js";
99
99
  import {
100
100
  getFontExtensions,
101
101
  nextCompatEnabled
@@ -105,7 +105,7 @@ import {
105
105
  } from "./index-knp0s912.js";
106
106
  import {
107
107
  frameworkFingerprint
108
- } from "./index-md5jchzy.js";
108
+ } from "./index-1xrvw3zp.js";
109
109
  import {
110
110
  escapeHtml
111
111
  } from "./index-ye9hmsvf.js";
@@ -115,8 +115,8 @@ import {
115
115
  import"./index-fp8r0sqs.js";
116
116
  import"./index-cjgqs13g.js";
117
117
  import"./index-yhxkxghe.js";
118
- import"./index-jjppzw0s.js";
119
- import"./index-veycp46e.js";
118
+ import"./index-72wjyacg.js";
119
+ import"./index-ra6fsg5v.js";
120
120
  import {
121
121
  ensureDir,
122
122
  exactNameIndex,
@@ -124,7 +124,7 @@ import {
124
124
  listFiles,
125
125
  writeFileAtomic,
126
126
  writeText
127
- } from "./index-4qsce64w.js";
127
+ } from "./index-e63ma63t.js";
128
128
  import {
129
129
  markBoot
130
130
  } from "./index-tq1f96v7.js";
@@ -135,15 +135,15 @@ import {
135
135
  abortUpstreamFetchOnDisconnect,
136
136
  bootstrapCompat,
137
137
  bootstrapCompatBoot
138
- } from "./index-yzcpr3yw.js";
139
- import"./index-zedjt25v.js";
138
+ } from "./index-drfxdvvh.js";
139
+ import"./index-x3cvacmf.js";
140
140
  import {
141
141
  outCachePath
142
142
  } from "./index-bzd2ef7t.js";
143
143
  import {
144
144
  markErrorLogged
145
145
  } from "./index-jcsjq3d1.js";
146
- import"./index-fpghsgb4.js";
146
+ import"./index-pshjr3qm.js";
147
147
  import"./index-6kp9r0d9.js";
148
148
  import {
149
149
  ssrClientReference
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  writeTsconfigDefaults
4
- } from "./index-0wm2p3ks.js";
4
+ } from "./index-fdc7wz3a.js";
5
5
  import"./index-m63czgq5.js";
6
6
  import"./index-cjgqs13g.js";
7
7
  import"./index-jks0x0a1.js";
@@ -9,8 +9,8 @@ import"./index-6b009mt0.js";
9
9
  import"./index-4zzebszd.js";
10
10
  import"./index-sq3kvz3g.js";
11
11
  import"./index-ckkdpht5.js";
12
- import"./index-4qsce64w.js";
13
- import"./index-fpghsgb4.js";
12
+ import"./index-e63ma63t.js";
13
+ import"./index-pshjr3qm.js";
14
14
  import"./index-kresp2n8.js";
15
15
  import"./index-e3a6yx84.js";
16
16
  import"./index-7wc9n8be.js";
@@ -2,22 +2,22 @@
2
2
  import {
3
3
  typegenProject,
4
4
  writeTypegen
5
- } from "./index-y71a76dn.js";
6
- import"./index-3r6qpe8a.js";
5
+ } from "./index-tgwt3kwf.js";
6
+ import"./index-p79ck9cd.js";
7
7
  import"./index-0r5eqfc7.js";
8
- import"./index-aarf1brn.js";
9
- import"./index-1y0cesgn.js";
8
+ import"./index-a4asdd4j.js";
9
+ import"./index-r1kzsnyp.js";
10
10
  import"./index-73z4esab.js";
11
- import"./index-xrsg0041.js";
11
+ import"./index-6w807g31.js";
12
12
  import"./index-web361b8.js";
13
13
  import"./index-fp8r0sqs.js";
14
14
  import"./index-cjgqs13g.js";
15
- import"./index-veycp46e.js";
16
- import"./index-4qsce64w.js";
17
- import"./index-yzcpr3yw.js";
18
- import"./index-zedjt25v.js";
15
+ import"./index-ra6fsg5v.js";
16
+ import"./index-e63ma63t.js";
17
+ import"./index-drfxdvvh.js";
18
+ import"./index-x3cvacmf.js";
19
19
  import"./index-bzd2ef7t.js";
20
- import"./index-fpghsgb4.js";
20
+ import"./index-pshjr3qm.js";
21
21
  import"./index-6kp9r0d9.js";
22
22
  import"./index-ras0sdab.js";
23
23
  import"./index-grta8ap3.js";
@@ -63,7 +63,7 @@ try {
63
63
  printCommandHelp(command);
64
64
  } else if (command === "dev") {
65
65
  warnUnknownFlags(command, args);
66
- const { dev } = await import("../_chunks/dev-pennd36n.js");
66
+ const { dev } = await import("../_chunks/dev-kwp1t8b3.js");
67
67
  await dev({
68
68
  root: positionalRoot(args),
69
69
  port: optionNumber(args, "--port"),
@@ -71,7 +71,7 @@ try {
71
71
  });
72
72
  } else if (command === "build") {
73
73
  warnUnknownFlags(command, args);
74
- const { buildProject } = await import("../_chunks/build-wspv5h60.js");
74
+ const { buildProject } = await import("../_chunks/build-ntq282xh.js");
75
75
  await buildProject(positionalRoot(args), {
76
76
  adapter: adapterOption(args),
77
77
  verbose: args.includes("--verbose"),
@@ -79,7 +79,7 @@ try {
79
79
  buildMode: buildModeOption(args),
80
80
  debugPrerender: args.includes("--debug-prerender")
81
81
  });
82
- await (await import("../_chunks/build-jda155c9.js")).stopCssWorker();
82
+ await (await import("../_chunks/build-m49fem3j.js")).stopCssWorker();
83
83
  process.exit(0);
84
84
  } else if (command === "start") {
85
85
  warnUnknownFlags(command, args);
@@ -92,7 +92,7 @@ try {
92
92
  });
93
93
  } else if (command === "analyze") {
94
94
  warnUnknownFlags(command, args);
95
- const { analyzeProject } = await import("../_chunks/analyze-09kx9q6r.js");
95
+ const { analyzeProject } = await import("../_chunks/analyze-c45xjea8.js");
96
96
  const { route, root } = analyzePositionals(args);
97
97
  const result = await analyzeProject(root, {
98
98
  compression: analyzeCompression(args),
@@ -101,23 +101,23 @@ try {
101
101
  if (args.includes("--json")) {
102
102
  console.log(JSON.stringify(result, null, 2));
103
103
  } else {
104
- const { printAnalyzeResult } = await import("../_chunks/analyze-09kx9q6r.js");
104
+ const { printAnalyzeResult } = await import("../_chunks/analyze-c45xjea8.js");
105
105
  printAnalyzeResult(result, { route, files: args.includes("--files") });
106
106
  }
107
107
  } else if (command === "typegen") {
108
108
  warnUnknownFlags(command, args);
109
- const { typegenProject } = await import("../_chunks/typegen-0yw8sry8.js");
109
+ const { typegenProject } = await import("../_chunks/typegen-wdqj67rx.js");
110
110
  const result = await typegenProject(positionalRoot(args));
111
111
  console.log(`Generated ${result.routes} route types, ${result.aliases} aliases, and ${result.checks} checks at ${result.file}`);
112
112
  process.exit(0);
113
113
  } else if (command === "create") {
114
114
  warnUnknownFlags(command, args);
115
- const { createApp } = await import("../_chunks/create-skj8wzt5.js");
115
+ const { createApp } = await import("../_chunks/create-k089tdt7.js");
116
116
  await createApp(positionals(args)[0], { install: !args.includes("--no-install") });
117
117
  process.exit(0);
118
118
  } else if (command === "migrate") {
119
119
  warnUnknownFlags(command, args);
120
- const { migrateApp } = await import("../_chunks/run-tk90r3ac.js");
120
+ const { migrateApp } = await import("../_chunks/run-q8aq4cez.js");
121
121
  const code = await migrateApp(positionalRoot(args), { dryRun: args.includes("--dry-run") });
122
122
  process.exit(code);
123
123
  } else if (command === "info") {
@@ -150,11 +150,11 @@ pnext client import trace for route `);
150
150
  };
151
151
  }
152
152
  async function prebundleServes(root = process.cwd()) {
153
- if (typeof { version: "0.1.9", fingerprint: "5c05030a635e53e4", entries: ["cli/index", "cli/start", "client/reference", "api/client-cache", "compat/next/canonical-url", "compat/next/link-transform", "compat/next/client-navigation", "compat/next/og", "compat/next/link", "compat/next/usage", "compat/next/client-script", "compat/next/headers", "compat/next/custom-server", "compat/next/legacy-image", "compat/next/router", "compat/next/navigation", "compat/next/dist/server/web/spec-extension/unstable-no-store", "compat/next/dist/server/web/spec-extension/unstable-cache", "compat/next/dist/server/web/spec-extension/revalidate", "compat/next/dist/client/components/app-router-headers", "compat/next/web-vitals", "compat/next/root-params", "compat/next/route-state", "compat/next/server-only", "compat/next/client-server", "compat/next/legacy-request-apis", "compat/next/redirects", "compat/next/resource-hints", "compat/next/svgr", "compat/next/client-only", "compat/next/image/props", "compat/next/image/optimizer", "compat/next/image/validate", "compat/next/image/shared", "compat/next/image/patterns", "compat/next/image/config", "compat/next/image/client", "compat/next/image/static-metadata", "compat/next/user-agent", "compat/next/client-cache", "compat/next/head", "compat/next/dynamic", "compat/next/telemetry", "compat/next/offline", "compat/next/cache", "compat/next/constants", "compat/next/error", "compat/next/script", "compat/next/index", "compat/next/font/shared", "compat/next/font/runtime", "compat/next/font/google", "compat/next/font/cache", "compat/next/font/runtime-client", "compat/next/font/local", "compat/next/font/index", "compat/next/config-loader", "compat/next/config", "compat/next/image", "compat/next/server", "compat/next/rewrites", "compat/next/preferred-region", "compat/next/config-headers", "compat/next/form", "compat/react/dom", "compat/react/hooks-extra", "compat/react/react-server", "compat/react/dom-client", "compat/react/style-values", "compat/react/compiler-runtime", "compat/react/router-shim", "compat/react/dom-server", "compat/react/dom-react-server", "compat/react/server-component-use", "compat/react/action-state", "compat/react/client", "compat/react/client-lite", "compat/react/server-inserted-html", "compat/react/parity", "compat/react/preact", "compat/react/use", "compat/react/view-transition", "compat/react/internals", "compat/react/server"] } !== "object")
153
+ if (typeof { version: "0.1.10", fingerprint: "db18aac8a57bc886", entries: ["cli/index", "cli/start", "client/reference", "api/client-cache", "compat/next/canonical-url", "compat/next/link-transform", "compat/next/client-navigation", "compat/next/og", "compat/next/link", "compat/next/usage", "compat/next/client-script", "compat/next/headers", "compat/next/custom-server", "compat/next/legacy-image", "compat/next/router", "compat/next/navigation", "compat/next/dist/server/web/spec-extension/unstable-no-store", "compat/next/dist/server/web/spec-extension/unstable-cache", "compat/next/dist/server/web/spec-extension/revalidate", "compat/next/dist/client/components/app-router-headers", "compat/next/web-vitals", "compat/next/root-params", "compat/next/route-state", "compat/next/server-only", "compat/next/client-server", "compat/next/legacy-request-apis", "compat/next/redirects", "compat/next/resource-hints", "compat/next/svgr", "compat/next/client-only", "compat/next/image/props", "compat/next/image/optimizer", "compat/next/image/validate", "compat/next/image/shared", "compat/next/image/patterns", "compat/next/image/config", "compat/next/image/client", "compat/next/image/static-metadata", "compat/next/user-agent", "compat/next/client-cache", "compat/next/head", "compat/next/dynamic", "compat/next/telemetry", "compat/next/offline", "compat/next/cache", "compat/next/constants", "compat/next/error", "compat/next/script", "compat/next/index", "compat/next/font/shared", "compat/next/font/runtime", "compat/next/font/google", "compat/next/font/cache", "compat/next/font/runtime-client", "compat/next/font/local", "compat/next/font/index", "compat/next/config-loader", "compat/next/config", "compat/next/image", "compat/next/server", "compat/next/rewrites", "compat/next/preferred-region", "compat/next/config-headers", "compat/next/form", "compat/react/dom", "compat/react/hooks-extra", "compat/react/react-server", "compat/react/dom-client", "compat/react/style-values", "compat/react/compiler-runtime", "compat/react/router-shim", "compat/react/dom-server", "compat/react/dom-react-server", "compat/react/server-component-use", "compat/react/action-state", "compat/react/client", "compat/react/client-lite", "compat/react/server-inserted-html", "compat/react/parity", "compat/react/preact", "compat/react/use", "compat/react/view-transition", "compat/react/internals", "compat/react/server"] } !== "object")
154
154
  return true;
155
- const [{ DEFAULT_OUT_DIR, standaloneOutSegment }, { buildIndexFile, readBuildIndex }] = await Promise.all([import("../_chunks/config-d4hqyygy.js"), import("../_chunks/production-1xe9b7wd.js")]);
155
+ const [{ DEFAULT_OUT_DIR, standaloneOutSegment }, { buildIndexFile, readBuildIndex }] = await Promise.all([import("../_chunks/config-1hdw96je.js"), import("../_chunks/production-26vqtxvg.js")]);
156
156
  const outPath = path.resolve(root, DEFAULT_OUT_DIR, standaloneOutSegment);
157
- return !existsSync(buildIndexFile(outPath)) || readBuildIndex(outPath).framework === { version: "0.1.9", fingerprint: "5c05030a635e53e4", entries: ["cli/index", "cli/start", "client/reference", "api/client-cache", "compat/next/canonical-url", "compat/next/link-transform", "compat/next/client-navigation", "compat/next/og", "compat/next/link", "compat/next/usage", "compat/next/client-script", "compat/next/headers", "compat/next/custom-server", "compat/next/legacy-image", "compat/next/router", "compat/next/navigation", "compat/next/dist/server/web/spec-extension/unstable-no-store", "compat/next/dist/server/web/spec-extension/unstable-cache", "compat/next/dist/server/web/spec-extension/revalidate", "compat/next/dist/client/components/app-router-headers", "compat/next/web-vitals", "compat/next/root-params", "compat/next/route-state", "compat/next/server-only", "compat/next/client-server", "compat/next/legacy-request-apis", "compat/next/redirects", "compat/next/resource-hints", "compat/next/svgr", "compat/next/client-only", "compat/next/image/props", "compat/next/image/optimizer", "compat/next/image/validate", "compat/next/image/shared", "compat/next/image/patterns", "compat/next/image/config", "compat/next/image/client", "compat/next/image/static-metadata", "compat/next/user-agent", "compat/next/client-cache", "compat/next/head", "compat/next/dynamic", "compat/next/telemetry", "compat/next/offline", "compat/next/cache", "compat/next/constants", "compat/next/error", "compat/next/script", "compat/next/index", "compat/next/font/shared", "compat/next/font/runtime", "compat/next/font/google", "compat/next/font/cache", "compat/next/font/runtime-client", "compat/next/font/local", "compat/next/font/index", "compat/next/config-loader", "compat/next/config", "compat/next/image", "compat/next/server", "compat/next/rewrites", "compat/next/preferred-region", "compat/next/config-headers", "compat/next/form", "compat/react/dom", "compat/react/hooks-extra", "compat/react/react-server", "compat/react/dom-client", "compat/react/style-values", "compat/react/compiler-runtime", "compat/react/router-shim", "compat/react/dom-server", "compat/react/dom-react-server", "compat/react/server-component-use", "compat/react/action-state", "compat/react/client", "compat/react/client-lite", "compat/react/server-inserted-html", "compat/react/parity", "compat/react/preact", "compat/react/use", "compat/react/view-transition", "compat/react/internals", "compat/react/server"] }.fingerprint && VERSION === { version: "0.1.9", fingerprint: "5c05030a635e53e4", entries: ["cli/index", "cli/start", "client/reference", "api/client-cache", "compat/next/canonical-url", "compat/next/link-transform", "compat/next/client-navigation", "compat/next/og", "compat/next/link", "compat/next/usage", "compat/next/client-script", "compat/next/headers", "compat/next/custom-server", "compat/next/legacy-image", "compat/next/router", "compat/next/navigation", "compat/next/dist/server/web/spec-extension/unstable-no-store", "compat/next/dist/server/web/spec-extension/unstable-cache", "compat/next/dist/server/web/spec-extension/revalidate", "compat/next/dist/client/components/app-router-headers", "compat/next/web-vitals", "compat/next/root-params", "compat/next/route-state", "compat/next/server-only", "compat/next/client-server", "compat/next/legacy-request-apis", "compat/next/redirects", "compat/next/resource-hints", "compat/next/svgr", "compat/next/client-only", "compat/next/image/props", "compat/next/image/optimizer", "compat/next/image/validate", "compat/next/image/shared", "compat/next/image/patterns", "compat/next/image/config", "compat/next/image/client", "compat/next/image/static-metadata", "compat/next/user-agent", "compat/next/client-cache", "compat/next/head", "compat/next/dynamic", "compat/next/telemetry", "compat/next/offline", "compat/next/cache", "compat/next/constants", "compat/next/error", "compat/next/script", "compat/next/index", "compat/next/font/shared", "compat/next/font/runtime", "compat/next/font/google", "compat/next/font/cache", "compat/next/font/runtime-client", "compat/next/font/local", "compat/next/font/index", "compat/next/config-loader", "compat/next/config", "compat/next/image", "compat/next/server", "compat/next/rewrites", "compat/next/preferred-region", "compat/next/config-headers", "compat/next/form", "compat/react/dom", "compat/react/hooks-extra", "compat/react/react-server", "compat/react/dom-client", "compat/react/style-values", "compat/react/compiler-runtime", "compat/react/router-shim", "compat/react/dom-server", "compat/react/dom-react-server", "compat/react/server-component-use", "compat/react/action-state", "compat/react/client", "compat/react/client-lite", "compat/react/server-inserted-html", "compat/react/parity", "compat/react/preact", "compat/react/use", "compat/react/view-transition", "compat/react/internals", "compat/react/server"] }.version;
157
+ return !existsSync(buildIndexFile(outPath)) || readBuildIndex(outPath).framework === { version: "0.1.10", fingerprint: "db18aac8a57bc886", entries: ["cli/index", "cli/start", "client/reference", "api/client-cache", "compat/next/canonical-url", "compat/next/link-transform", "compat/next/client-navigation", "compat/next/og", "compat/next/link", "compat/next/usage", "compat/next/client-script", "compat/next/headers", "compat/next/custom-server", "compat/next/legacy-image", "compat/next/router", "compat/next/navigation", "compat/next/dist/server/web/spec-extension/unstable-no-store", "compat/next/dist/server/web/spec-extension/unstable-cache", "compat/next/dist/server/web/spec-extension/revalidate", "compat/next/dist/client/components/app-router-headers", "compat/next/web-vitals", "compat/next/root-params", "compat/next/route-state", "compat/next/server-only", "compat/next/client-server", "compat/next/legacy-request-apis", "compat/next/redirects", "compat/next/resource-hints", "compat/next/svgr", "compat/next/client-only", "compat/next/image/props", "compat/next/image/optimizer", "compat/next/image/validate", "compat/next/image/shared", "compat/next/image/patterns", "compat/next/image/config", "compat/next/image/client", "compat/next/image/static-metadata", "compat/next/user-agent", "compat/next/client-cache", "compat/next/head", "compat/next/dynamic", "compat/next/telemetry", "compat/next/offline", "compat/next/cache", "compat/next/constants", "compat/next/error", "compat/next/script", "compat/next/index", "compat/next/font/shared", "compat/next/font/runtime", "compat/next/font/google", "compat/next/font/cache", "compat/next/font/runtime-client", "compat/next/font/local", "compat/next/font/index", "compat/next/config-loader", "compat/next/config", "compat/next/image", "compat/next/server", "compat/next/rewrites", "compat/next/preferred-region", "compat/next/config-headers", "compat/next/form", "compat/react/dom", "compat/react/hooks-extra", "compat/react/react-server", "compat/react/dom-client", "compat/react/style-values", "compat/react/compiler-runtime", "compat/react/router-shim", "compat/react/dom-server", "compat/react/dom-react-server", "compat/react/server-component-use", "compat/react/action-state", "compat/react/client", "compat/react/client-lite", "compat/react/server-inserted-html", "compat/react/parity", "compat/react/preact", "compat/react/use", "compat/react/view-transition", "compat/react/internals", "compat/react/server"] }.fingerprint && VERSION === { version: "0.1.10", fingerprint: "db18aac8a57bc886", entries: ["cli/index", "cli/start", "client/reference", "api/client-cache", "compat/next/canonical-url", "compat/next/link-transform", "compat/next/client-navigation", "compat/next/og", "compat/next/link", "compat/next/usage", "compat/next/client-script", "compat/next/headers", "compat/next/custom-server", "compat/next/legacy-image", "compat/next/router", "compat/next/navigation", "compat/next/dist/server/web/spec-extension/unstable-no-store", "compat/next/dist/server/web/spec-extension/unstable-cache", "compat/next/dist/server/web/spec-extension/revalidate", "compat/next/dist/client/components/app-router-headers", "compat/next/web-vitals", "compat/next/root-params", "compat/next/route-state", "compat/next/server-only", "compat/next/client-server", "compat/next/legacy-request-apis", "compat/next/redirects", "compat/next/resource-hints", "compat/next/svgr", "compat/next/client-only", "compat/next/image/props", "compat/next/image/optimizer", "compat/next/image/validate", "compat/next/image/shared", "compat/next/image/patterns", "compat/next/image/config", "compat/next/image/client", "compat/next/image/static-metadata", "compat/next/user-agent", "compat/next/client-cache", "compat/next/head", "compat/next/dynamic", "compat/next/telemetry", "compat/next/offline", "compat/next/cache", "compat/next/constants", "compat/next/error", "compat/next/script", "compat/next/index", "compat/next/font/shared", "compat/next/font/runtime", "compat/next/font/google", "compat/next/font/cache", "compat/next/font/runtime-client", "compat/next/font/local", "compat/next/font/index", "compat/next/config-loader", "compat/next/config", "compat/next/image", "compat/next/server", "compat/next/rewrites", "compat/next/preferred-region", "compat/next/config-headers", "compat/next/form", "compat/react/dom", "compat/react/hooks-extra", "compat/react/react-server", "compat/react/dom-client", "compat/react/style-values", "compat/react/compiler-runtime", "compat/react/router-shim", "compat/react/dom-server", "compat/react/dom-react-server", "compat/react/server-component-use", "compat/react/action-state", "compat/react/client", "compat/react/client-lite", "compat/react/server-inserted-html", "compat/react/parity", "compat/react/preact", "compat/react/use", "compat/react/view-transition", "compat/react/internals", "compat/react/server"] }.version;
158
158
  }
159
159
  function positionalRoot(args2) {
160
160
  return positionals(args2)[0];
@@ -7,10 +7,10 @@ import {
7
7
  } from "../_chunks/index-q738kkhj.js";
8
8
  import {
9
9
  bootstrapCompat
10
- } from "../_chunks/index-yzcpr3yw.js";
10
+ } from "../_chunks/index-drfxdvvh.js";
11
11
  import {
12
12
  loadConfig
13
- } from "../_chunks/index-zedjt25v.js";
13
+ } from "../_chunks/index-x3cvacmf.js";
14
14
  import"../_chunks/index-bzd2ef7t.js";
15
15
  import {
16
16
  markErrorLogged
@@ -20,7 +20,7 @@ import {
20
20
  buildManifestFile,
21
21
  linkStandaloneOrigins,
22
22
  registerPrebundleResolve
23
- } from "../_chunks/index-fpghsgb4.js";
23
+ } from "../_chunks/index-pshjr3qm.js";
24
24
  import"../_chunks/index-6kp9r0d9.js";
25
25
  import {
26
26
  drainWorkUnits
@@ -51,7 +51,7 @@ async function createRequestHandler(options = {}) {
51
51
  const shipped = await shippedStart(config);
52
52
  return shipped.createRequestHandler({ root: options.root, manifest: options.manifest });
53
53
  }
54
- const { createRequestHandler: create } = await import("../_chunks/pipeline-yjdnwbhm.js");
54
+ const { createRequestHandler: create } = await import("../_chunks/pipeline-m8ac90dn.js");
55
55
  return create({ ...options, config });
56
56
  }
57
57
  function shipsElsewhere(config) {
@@ -62,7 +62,7 @@ function shippedStart(config) {
62
62
  return import(entry);
63
63
  }
64
64
  async function maybeBuiltFile(...args) {
65
- const { maybeBuiltFile: impl } = await import("../_chunks/pipeline-yjdnwbhm.js");
65
+ const { maybeBuiltFile: impl } = await import("../_chunks/pipeline-m8ac90dn.js");
66
66
  return impl(...args);
67
67
  }
68
68
  async function start(options = {}) {
@@ -3,8 +3,8 @@ import {
3
3
  appPathname,
4
4
  loadCompatHeaders,
5
5
  resolveCompatHeaders
6
- } from "../../_chunks/index-jexsy9a8.js";
7
- import"../../_chunks/index-e176wk6x.js";
6
+ } from "../../_chunks/index-ed6rwv1x.js";
7
+ import"../../_chunks/index-8y2yft9b.js";
8
8
  import"../../_chunks/index-6q7zvrap.js";
9
9
  import"../../_chunks/index-79ngvam8.js";
10
10
  import"../../_chunks/index-akkrvjn6.js";
@@ -16,9 +16,9 @@ import"../../_chunks/index-6b009mt0.js";
16
16
  import"../../_chunks/index-4zzebszd.js";
17
17
  import"../../_chunks/index-sq3kvz3g.js";
18
18
  import"../../_chunks/index-ckkdpht5.js";
19
- import"../../_chunks/index-zedjt25v.js";
19
+ import"../../_chunks/index-x3cvacmf.js";
20
20
  import"../../_chunks/index-bzd2ef7t.js";
21
- import"../../_chunks/index-fpghsgb4.js";
21
+ import"../../_chunks/index-pshjr3qm.js";
22
22
  import"../../_chunks/index-grta8ap3.js";
23
23
  import"../../_chunks/index-kresp2n8.js";
24
24
  import"../../_chunks/index-e3a6yx84.js";
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  persistFont,
4
4
  persistedFont
5
- } from "../../../_chunks/index-s61bx2aj.js";
5
+ } from "../../../_chunks/index-56jw1658.js";
6
6
  import"../../../_chunks/index-knp0s912.js";
7
- import"../../../_chunks/index-md5jchzy.js";
8
- import"../../../_chunks/index-4qsce64w.js";
7
+ import"../../../_chunks/index-1xrvw3zp.js";
8
+ import"../../../_chunks/index-e63ma63t.js";
9
9
  import"../../../_chunks/index-bzd2ef7t.js";
10
- import"../../../_chunks/index-fpghsgb4.js";
10
+ import"../../../_chunks/index-pshjr3qm.js";
11
11
  import"../../../_chunks/index-jt8e1pje.js";
12
12
  import"../../../_chunks/index-rt9qq1va.js";
13
13
  export {
@@ -1,14 +1,14 @@
1
1
  // @bun
2
2
  import {
3
3
  localFont
4
- } from "../../../_chunks/index-26gwrm07.js";
5
- import"../../../_chunks/index-s61bx2aj.js";
4
+ } from "../../../_chunks/index-nxg8k7cg.js";
5
+ import"../../../_chunks/index-56jw1658.js";
6
6
  import"../../../_chunks/index-knp0s912.js";
7
- import"../../../_chunks/index-md5jchzy.js";
7
+ import"../../../_chunks/index-1xrvw3zp.js";
8
8
  import"../../../_chunks/index-fn1chkkd.js";
9
- import"../../../_chunks/index-4qsce64w.js";
9
+ import"../../../_chunks/index-e63ma63t.js";
10
10
  import"../../../_chunks/index-bzd2ef7t.js";
11
- import"../../../_chunks/index-fpghsgb4.js";
11
+ import"../../../_chunks/index-pshjr3qm.js";
12
12
  import"../../../_chunks/index-grta8ap3.js";
13
13
  import"../../../_chunks/index-kresp2n8.js";
14
14
  import"../../../_chunks/index-e3a6yx84.js";
@@ -12,14 +12,14 @@ import {
12
12
  releaseFonts,
13
13
  runWithFontScope,
14
14
  takeFontHeaderPreloads
15
- } from "../../../_chunks/index-26gwrm07.js";
16
- import"../../../_chunks/index-s61bx2aj.js";
15
+ } from "../../../_chunks/index-nxg8k7cg.js";
16
+ import"../../../_chunks/index-56jw1658.js";
17
17
  import"../../../_chunks/index-knp0s912.js";
18
- import"../../../_chunks/index-md5jchzy.js";
18
+ import"../../../_chunks/index-1xrvw3zp.js";
19
19
  import"../../../_chunks/index-fn1chkkd.js";
20
- import"../../../_chunks/index-4qsce64w.js";
20
+ import"../../../_chunks/index-e63ma63t.js";
21
21
  import"../../../_chunks/index-bzd2ef7t.js";
22
- import"../../../_chunks/index-fpghsgb4.js";
22
+ import"../../../_chunks/index-pshjr3qm.js";
23
23
  import"../../../_chunks/index-grta8ap3.js";
24
24
  import"../../../_chunks/index-kresp2n8.js";
25
25
  import"../../../_chunks/index-e3a6yx84.js";
@@ -3,10 +3,10 @@ import {
3
3
  currentLayoutSegments,
4
4
  currentParamsSnapshot,
5
5
  hasLayoutSegmentScope
6
- } from "../../_chunks/index-jjppzw0s.js";
7
- import"../../_chunks/index-veycp46e.js";
8
- import"../../_chunks/index-4qsce64w.js";
9
- import"../../_chunks/index-fpghsgb4.js";
6
+ } from "../../_chunks/index-72wjyacg.js";
7
+ import"../../_chunks/index-ra6fsg5v.js";
8
+ import"../../_chunks/index-e63ma63t.js";
9
+ import"../../_chunks/index-pshjr3qm.js";
10
10
  import {
11
11
  canonicalUrlHref
12
12
  } from "../../_chunks/index-en7n9f7m.js";
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  loadCompatRedirects,
4
4
  resolveCompatRedirect
5
- } from "../../_chunks/index-y9bygr95.js";
6
- import"../../_chunks/index-e176wk6x.js";
5
+ } from "../../_chunks/index-hw5k2sgj.js";
6
+ import"../../_chunks/index-8y2yft9b.js";
7
7
  import"../../_chunks/index-6q7zvrap.js";
8
8
  import"../../_chunks/index-79ngvam8.js";
9
9
  import"../../_chunks/index-akkrvjn6.js";
@@ -15,9 +15,9 @@ import"../../_chunks/index-6b009mt0.js";
15
15
  import"../../_chunks/index-4zzebszd.js";
16
16
  import"../../_chunks/index-sq3kvz3g.js";
17
17
  import"../../_chunks/index-ckkdpht5.js";
18
- import"../../_chunks/index-zedjt25v.js";
18
+ import"../../_chunks/index-x3cvacmf.js";
19
19
  import"../../_chunks/index-bzd2ef7t.js";
20
- import"../../_chunks/index-fpghsgb4.js";
20
+ import"../../_chunks/index-pshjr3qm.js";
21
21
  import"../../_chunks/index-grta8ap3.js";
22
22
  import"../../_chunks/index-kresp2n8.js";
23
23
  import"../../_chunks/index-e3a6yx84.js";
@@ -8,7 +8,7 @@ import {
8
8
  resolveCompatRewrite,
9
9
  splitDestination,
10
10
  substitute
11
- } from "../../_chunks/index-e176wk6x.js";
11
+ } from "../../_chunks/index-8y2yft9b.js";
12
12
  import"../../_chunks/index-6q7zvrap.js";
13
13
  import"../../_chunks/index-79ngvam8.js";
14
14
  import"../../_chunks/index-akkrvjn6.js";
@@ -20,9 +20,9 @@ import"../../_chunks/index-6b009mt0.js";
20
20
  import"../../_chunks/index-4zzebszd.js";
21
21
  import"../../_chunks/index-sq3kvz3g.js";
22
22
  import"../../_chunks/index-ckkdpht5.js";
23
- import"../../_chunks/index-zedjt25v.js";
23
+ import"../../_chunks/index-x3cvacmf.js";
24
24
  import"../../_chunks/index-bzd2ef7t.js";
25
- import"../../_chunks/index-fpghsgb4.js";
25
+ import"../../_chunks/index-pshjr3qm.js";
26
26
  import"../../_chunks/index-grta8ap3.js";
27
27
  import"../../_chunks/index-kresp2n8.js";
28
28
  import"../../_chunks/index-e3a6yx84.js";
@@ -1 +1 @@
1
- {"version":"0.1.9","fingerprint":"5c05030a635e53e4","source":["src/api/cache.ts","src/api/client-navigation.ts","src/api/dynamic.tsx","src/api/link.tsx","src/api/navigation.ts","src/api/server.ts","src/api/suspense.ts","src/client/router/events.ts","src/client/router/history.ts","src/client/router/hub.ts","src/client/router/index.ts","src/client/router/page-slot.ts","src/client/router/policies.ts","src/client/router/runtime.ts","src/index.ts","src/internal.ts","src/request/cache.ts","src/routing/href.ts","src/utils/decode.ts"]}
1
+ {"version":"0.1.10","fingerprint":"db18aac8a57bc886","source":["src/api/cache.ts","src/api/client-navigation.ts","src/api/dynamic.tsx","src/api/link.tsx","src/api/navigation.ts","src/api/server.ts","src/api/suspense.ts","src/client/router/events.ts","src/client/router/history.ts","src/client/router/hub.ts","src/client/router/index.ts","src/client/router/page-slot.ts","src/client/router/policies.ts","src/client/router/runtime.ts","src/index.ts","src/internal.ts","src/request/cache.ts","src/routing/href.ts","src/utils/decode.ts"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wular/pnext",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "A fast little framework for server-first React apps, fully compatible with Next.js",
5
5
  "type": "module",
6
6
  "bin": {
@@ -614,7 +614,8 @@ async function importClientModules(
614
614
  ) {
615
615
  if (!getCompatModeExtensions().reactEnabled(config)) return
616
616
  for (const file of clientFiles) {
617
- if (skip.has(file)) continue
617
+ // A package's client modules serve from the linked dependency graph; a vendor href is dev-only.
618
+ if (skip.has(file) || file.includes(`${path.sep}node_modules${path.sep}`)) continue
618
619
  const href = await devClientModuleHref(config, file, 'build')
619
620
  report(file, fileURLToPath(href))
620
621
  try {
@@ -74,6 +74,16 @@ export async function writeVercelOutput(
74
74
  ),
75
75
  )
76
76
  const overrides = await staticOverrides(staticPath, staticFiles)
77
+ const proxy = await proxyRoutes(config)
78
+ await log.step('drop public files from the function', () =>
79
+ dropPublicFiles(
80
+ config.publicPath,
81
+ path.join(functionPath, 'static'),
82
+ staticFiles,
83
+ proxy.map(route => new RegExp(route.src)),
84
+ config.basePath,
85
+ ),
86
+ )
77
87
 
78
88
  const routes: NonNullable<VercelConfig['routes']> = [
79
89
  // next-compat documents reference the build output under Next's static path (assetPathname),
@@ -85,7 +95,7 @@ export async function writeVercelOutput(
85
95
  ...(await immutableAssetRoutes(staticPath, manifest.publicAssets)),
86
96
  // Proxy-matched paths go to the server function before the CDN filesystem
87
97
  // check — `pnext start` runs the proxy ahead of static files too.
88
- ...(await proxyRoutes(config)),
98
+ ...proxy,
89
99
  ...staticHeaderRoutes(staticFiles),
90
100
  { handle: 'filesystem' },
91
101
  { src: '^/.*$', dest: `/${SERVER_FUNCTION}` },
@@ -505,6 +515,32 @@ const functionOnlyHeaders = new Set([
505
515
  'set-cookie',
506
516
  ])
507
517
 
518
+ /**
519
+ * The CDN answers the app's `public/` files, so the function drops them: all but pages, files the CDN
520
+ * cannot serve, and paths a proxy route or an encoded name sends to it. Build assets stay: a render
521
+ * reads them (font CSS, inlined CSS).
522
+ */
523
+ async function dropPublicFiles(
524
+ publicDir: string,
525
+ dir: string,
526
+ staticFiles: Record<string, StaticFileMetadata>,
527
+ proxied: RegExp[],
528
+ basePath: string,
529
+ ) {
530
+ const publicFiles = existsSync(publicDir) ? await listFiles(publicDir) : []
531
+ const dropped = publicFiles
532
+ .map(source => toPosixPath(path.relative(publicDir, source)))
533
+ .filter(relative => {
534
+ const metadata = staticFiles[relative]
535
+ if (relative.endsWith('.html') || (metadata && !canServeStaticOnVercel(metadata)))
536
+ return false
537
+ if (requestPath(relative) !== relative) return false
538
+ const paths = [`/${relative}`, `${basePath}/${relative}`]
539
+ return !proxied.some(src => paths.some(pathname => src.test(pathname)))
540
+ })
541
+ await Promise.all(dropped.map(relative => rm(path.join(dir, relative), { force: true })))
542
+ }
543
+
508
544
  function canServeStaticOnVercel(metadata: StaticFileMetadata) {
509
545
  if (metadata.status !== 200) return false
510
546
  const headers = routeHeaders(metadata)
@@ -13,7 +13,7 @@ import { fileURLToPath, pathToFileURL } from 'node:url'
13
13
  import { frameworkRuntimeSpecifiers, type ResolvedConfig } from '../../config'
14
14
  import { frameworkFingerprint } from '../../runtime/fingerprint'
15
15
  import { cacheRoot, compiledSourceGraph, flushDevModuleCaches } from '../../runtime/module-cache'
16
- import { PREBUNDLE_STAMP, prebundledFile, readPrebundleStamp } from '../../runtime/prebundle'
16
+ import { PREBUNDLE_STAMP, readPrebundleStamp } from '../../runtime/prebundle'
17
17
  import {
18
18
  buildIndexFile,
19
19
  type BuildIndex,
@@ -40,9 +40,15 @@ const buildOnlyModule = /^(?:build|modules|loader|compile|esbuild|dev|run|typege
40
40
  const builtins = new Set(builtinModules)
41
41
  const scriptFile = /\.(?:[cm]?[jt]sx?)$/
42
42
 
43
+ let prebundled: boolean | undefined
44
+ /** Whether a release serves from the framework's prebundle: one matches this source. */
45
+ function servesPrebundle() {
46
+ return (prebundled ??= readPrebundleStamp(frameworkRoot, frameworkFingerprint()) !== undefined)
47
+ }
48
+
43
49
  /** The framework module a release serves from: its prebundle when one matches this source. */
44
50
  function frameworkStartEntry() {
45
- return readPrebundleStamp(frameworkRoot, frameworkFingerprint())
51
+ return servesPrebundle()
46
52
  ? path.join(frameworkRoot, 'dist', 'server', 'cli', 'start.js')
47
53
  : path.join(frameworkRoot, 'src', 'cli', 'start.ts')
48
54
  }
@@ -580,11 +586,13 @@ function resolveEdge(specifier: string, from: string, require = false) {
580
586
  return target
581
587
  }
582
588
 
583
- /** The prebundled module a framework source file is served by, when it has one. */
589
+ /** The prebundled module a framework source file is served by, when the release serves the prebundle. */
584
590
  function frameworkCounterparts(file: string) {
585
- const counterpart = prebundledFile(file)
586
- if (counterpart === file) return []
587
- return [counterpart, path.join(frameworkRoot, PREBUNDLE_STAMP)]
591
+ const src = path.join(frameworkRoot, 'src')
592
+ if (!servesPrebundle() || !isInside(src, file)) return []
593
+ const relative = path.relative(src, file).replace(/\.tsx?$/, '.js')
594
+ const counterpart = path.join(frameworkRoot, 'dist', 'server', relative)
595
+ return existsSync(counterpart) ? [counterpart, path.join(frameworkRoot, PREBUNDLE_STAMP)] : []
588
596
  }
589
597
 
590
598
  /** `_chunks/name-<hash>.js` chunk or `name.ts` module -> `name`. */