@opennextjs/cloudflare 0.4.2 → 0.4.3
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.
|
@@ -18,19 +18,16 @@ export function getCloudflareContext() {
|
|
|
18
18
|
// the cloudflare context is initialized by the worker and is always present in production/preview
|
|
19
19
|
// during local development (`next dev`) it might be missing only if the developers hasn't called
|
|
20
20
|
// the `initOpenNextCloudflareForDev` function in their Next.js config file
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
`
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
` ${initFunctionName}();\n\n` +
|
|
29
|
-
" /** @type {import('next').NextConfig} */\n" +
|
|
30
|
-
" const nextConfig = {};\n" +
|
|
21
|
+
throw new Error(`\n\nERROR: \`getCloudflareContext\` has been called without having called` +
|
|
22
|
+
` \`initOpenNextCloudflareForDev\` from the Next.js config file.\n` +
|
|
23
|
+
`You should update your Next.js config file as shown below:\n\n` +
|
|
24
|
+
" ```\n // next.config.mjs\n\n" +
|
|
25
|
+
` import { initOpenNextCloudflareForDev } from "@opennextjs/cloudflare";\n\n` +
|
|
26
|
+
` initOpenNextCloudflareForDev();\n\n` +
|
|
27
|
+
" const nextConfig = { ... };\n" +
|
|
31
28
|
" export default nextConfig;\n" +
|
|
32
29
|
" ```\n" +
|
|
33
|
-
"\n
|
|
30
|
+
"\n");
|
|
34
31
|
}
|
|
35
32
|
return cloudflareContext;
|
|
36
33
|
}
|
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.4.
|
|
4
|
+
"version": "0.4.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"opennextjs-cloudflare": "dist/cli/index.js"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"yaml": "^2.7.0"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"wrangler": "^3.
|
|
73
|
+
"wrangler": "^3.107.0"
|
|
74
74
|
},
|
|
75
75
|
"scripts": {
|
|
76
76
|
"clean": "rimraf dist",
|