File tree Expand file tree Collapse file tree 6 files changed +19
-15
lines changed Expand file tree Collapse file tree 6 files changed +19
-15
lines changed Original file line number Diff line number Diff line change 4
4
5
5
- wrangler alias
6
6
- move the wrangler.toml to the templates
7
- - figure out the assets
8
7
- dependency graph
9
8
10
9
DONE:
11
10
11
+ - figure out the assets
12
12
- copy the template folders
13
13
14
14
## Install:
@@ -32,7 +32,7 @@ export default nextConfig;
32
32
33
33
- add "node-url": "npm:url@^0.11.4" to the package.json
34
34
35
- - add a wrangler.tom int the generated app
35
+ - add a wrangler.toml int the generated app
36
36
37
37
```
38
38
#:schema node_modules/wrangler/config-schema.json
@@ -66,11 +66,11 @@ pnpm --filter builder build:watch
66
66
Build the next app once:
67
67
68
68
```
69
- node /path/to/poc-next/builder/dist/index.mjs && wrangler dev
69
+ node /path/to/poc-next/builder/dist/index.mjs && npx wrangler dev
70
70
```
71
71
72
72
Then you can skip building the next app
73
73
74
74
```
75
- SKIP_NEXT_APP_BUILD=1 node /path/to/poc-next/builder/dist/index.mjs && wrangler dev
75
+ SKIP_NEXT_APP_BUILD=1 node /path/to/poc-next/builder/dist/index.mjs && npx wrangler dev
76
76
```
Original file line number Diff line number Diff line change 16
16
"tsup" : " ^8.2.4" ,
17
17
"typescript" : " ^5.5.4"
18
18
}
19
- }
19
+ }
Original file line number Diff line number Diff line change @@ -101,9 +101,13 @@ export async function buildWorker(
101
101
updateWebpackChunksFile ( nextjsAppPaths ) ;
102
102
103
103
console . log ( `\x1b[35m⚙️ Copying asset files...\n\x1b[0m` ) ;
104
- await cp ( `${ nextjsAppPaths . dotNextDir } /static` , `${ outputDir } /assets/_next` , {
105
- recursive : true ,
106
- } ) ;
104
+ await cp (
105
+ `${ nextjsAppPaths . dotNextDir } /static` ,
106
+ `${ outputDir } /assets/_next/static` ,
107
+ {
108
+ recursive : true ,
109
+ }
110
+ ) ;
107
111
108
112
console . log ( `\x1b[35mWorker saved in \`${ workerOutputFile } \` 🚀\n\x1b[0m` ) ;
109
113
}
@@ -187,4 +191,4 @@ function createFixRequiresESBuildPlugin(templateDir: string): Plugin {
187
191
} ) ) ;
188
192
} ,
189
193
} ;
190
- } ;
194
+ }
Original file line number Diff line number Diff line change 5
5
* Hopefully this should not be necessary after this unenv PR lands: https://github.com/unjs/unenv/pull/292
6
6
*/
7
7
export function patchUrl ( code : string ) : string {
8
- console . log ( "# patchUrl" ) ;
8
+ console . log ( "# patchUrl" ) ;
9
9
return code . replace (
10
10
/ ( [ a - z A - Z 0 - 9 _ ] + ) = r e q u i r e \( " u r l " \) ; / g,
11
11
` $1 = require("url");
Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ export async function build(
24
24
if ( ! opts . skipBuild ) {
25
25
// Build the next app and save a copy in .save.next
26
26
buildNextjsApp ( inputNextAppDir ) ;
27
- rmSync ( `${ inputNextAppDir } /${ SAVE_DIR } ` , {
28
- recursive : true ,
29
- force : true ,
30
- } ) ;
27
+ rmSync ( `${ inputNextAppDir } /${ SAVE_DIR } ` , {
28
+ recursive : true ,
29
+ force : true ,
30
+ } ) ;
31
31
cpSync ( `${ inputNextAppDir } /.next` , `${ inputNextAppDir } /${ SAVE_DIR } ` , {
32
32
recursive : true ,
33
33
} ) ;
Original file line number Diff line number Diff line change 24
24
"node-url" : " npm:url@^0.11.4" ,
25
25
"wrangler" : " 3.76.0"
26
26
}
27
- }
27
+ }
You can’t perform that action at this time.
0 commit comments