File tree Expand file tree Collapse file tree 1 file changed +11
-25
lines changed
Expand file tree Collapse file tree 1 file changed +11
-25
lines changed Original file line number Diff line number Diff line change @@ -47,45 +47,31 @@ compatibility, update your `deno.json` file with the following configuration:
4747
4848``` json deno.json
4949{
50- "nodeModulesDir" : " auto" ,
5150 "unstable" : [
51+ " bare-node-builtins" ,
52+ " detect-cjs" ,
53+ " node-globals" ,
5254 " unsafe-proto" ,
5355 " sloppy-imports"
54- ],
55- "compilerOptions" : {
56- "lib" : [
57- " dom" ,
58- " dom.iterable" ,
59- " esnext"
60- ],
61- "strict" : true ,
62- "jsx" : " preserve"
63- },
64- "tasks" : {
65- "dev" : " deno run -A --unstable-detect-cjs npm:next@latest dev" ,
66- "build" : " deno run -A --unstable-detect-cjs npm:next@latest build" ,
67- "start" : " deno run -A --unstable-detect-cjs npm:next@latest start"
68- }
56+ ]
6957}
7058```
7159
72- This configuration includes :
60+ Now install the dependencies found in the package.json :
7361
74- - ` nodeModulesDir: "auto" ` - Enables npm package lifecycle scripts
75- - ` unstable: ["unsafe-proto", "sloppy-imports"] ` - Required for Next.js
76- compatibility
77- - ` --unstable-detect-cjs ` flag - Enables CommonJS module detection for Next.js
78- dependencies
62+ ``` sh
63+ deno install --allow-scripts
64+ ```
7965
8066Now you can serve your new Next.js app:
8167
8268``` sh
83- deno run dev
69+ deno task dev
8470```
8571
8672This will start the Next.js development server using Deno. The ` deno task dev `
87- command runs the Next.js development server with the necessary flags for
88- CommonJS compatibility.
73+ command runs ` dev ` task in the package.json, which starts the Next.js
74+ development server with the necessary flags for CommonJS compatibility.
8975
9076Visit [ http://localhost:3000 ] ( http://localhost:3000 ) to see the app in the
9177browser.
You can’t perform that action at this time.
0 commit comments