@opennextjs/cloudflare 0.3.5 → 0.3.7
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.
|
@@ -28,7 +28,10 @@ async function getCloudflareContextInNextDev() {
|
|
|
28
28
|
// Note: we never want wrangler to be bundled in the Next.js app, that's why the import below looks like it does
|
|
29
29
|
const { getPlatformProxy } = await import(
|
|
30
30
|
/* webpackIgnore: true */ `${"__wrangler".replaceAll("_", "")}`);
|
|
31
|
-
const { env, cf, ctx } = await getPlatformProxy(
|
|
31
|
+
const { env, cf, ctx } = await getPlatformProxy({
|
|
32
|
+
// This allows the selection of a wrangler environment while running in next dev mode
|
|
33
|
+
environment: process.env.NEXT_DEV_WRANGLER_ENV,
|
|
34
|
+
});
|
|
32
35
|
global[cloudflareContextInNextDevSymbol] = {
|
|
33
36
|
env,
|
|
34
37
|
cf: cf,
|
|
@@ -127,8 +127,7 @@ async function generateBundle(name, options, fnOptions) {
|
|
|
127
127
|
target: /core(\/|\\)util\.js/g,
|
|
128
128
|
deletes: [
|
|
129
129
|
...(disableNextPrebundledReact ? ["requireHooks"] : []),
|
|
130
|
-
...(
|
|
131
|
-
...(!isBefore13413 ? ["requestHandlerHost"] : []),
|
|
130
|
+
...(isBefore13413 ? ["trustHostHeader"] : ["requestHandlerHost"]),
|
|
132
131
|
...(isAfter141 ? ["experimentalIncrementalCacheHandler"] : ["stableIncrementalCache"]),
|
|
133
132
|
],
|
|
134
133
|
}),
|
|
@@ -139,7 +139,7 @@ function patchRequireReactDomServerEdge(config) {
|
|
|
139
139
|
ReactDOMServer = require('react-dom/server.browser');
|
|
140
140
|
}
|
|
141
141
|
${parameterName}.exports = ReactDOMServer;
|
|
142
|
-
|
|
142
|
+
`.replace(/\ns*/g, " "));
|
|
143
143
|
});
|
|
144
144
|
const updatedCode = file.print();
|
|
145
145
|
writeFileSync(pagesRuntimeFile, updatedCode);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opennextjs/cloudflare",
|
|
3
3
|
"description": "Cloudflare builder for next apps",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.7",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"opennextjs-cloudflare": "dist/cli/index.js"
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"globals": "^15.9.0",
|
|
56
56
|
"mock-fs": "^5.4.1",
|
|
57
57
|
"next": "14.2.11",
|
|
58
|
+
"rimraf": "^6.0.1",
|
|
58
59
|
"typescript-eslint": "^8.7.0",
|
|
59
60
|
"typescript": "^5.5.4",
|
|
60
61
|
"vitest": "^2.1.1"
|
|
@@ -63,7 +64,6 @@
|
|
|
63
64
|
"@dotenvx/dotenvx": "1.31.0",
|
|
64
65
|
"@opennextjs/aws": "https://pkg.pr.new/@opennextjs/aws@688",
|
|
65
66
|
"glob": "^11.0.0",
|
|
66
|
-
"rimraf": "^6.0.1",
|
|
67
67
|
"ts-morph": "^23.0.0",
|
|
68
68
|
"enquirer": "^2.4.1"
|
|
69
69
|
},
|