File tree Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -185,13 +185,36 @@ export async function nextbuildstatic(task, opts) {
185
185
notify ( 'Compiled export files' )
186
186
}
187
187
188
- export async function pages ( task , opts ) {
188
+ export async function pages_app ( task ) {
189
+ await task
190
+ . source ( 'pages/_app.tsx' )
191
+ . babel ( babelClientOpts )
192
+ . target ( 'dist/pages' )
193
+ }
194
+
195
+ export async function pages_error ( task ) {
189
196
await task
190
- . source ( opts . src || 'pages/**/*.+(js|ts| tsx) ' )
197
+ . source ( 'pages/_error. tsx' )
191
198
. babel ( babelClientOpts )
192
199
. target ( 'dist/pages' )
193
200
}
194
201
202
+ export async function pages_document ( task ) {
203
+ const babelOpts = {
204
+ ...babelServerOpts ,
205
+ presets : [ ...babelServerOpts . presets , '@babel/preset-react' ] ,
206
+ }
207
+
208
+ await task
209
+ . source ( 'pages/_document.tsx' )
210
+ . babel ( babelOpts )
211
+ . target ( 'dist/pages' )
212
+ }
213
+
214
+ export async function pages ( task , opts ) {
215
+ await task . parallel ( [ 'pages_app' , 'pages_error' , 'pages_document' ] )
216
+ }
217
+
195
218
export async function telemetry ( task , opts ) {
196
219
await task
197
220
. source ( opts . src || 'telemetry/**/*.+(js|ts|tsx)' )
You can’t perform that action at this time.
0 commit comments