Skip to content

Commit bea488f

Browse files
timneutkensTimer
andcommitted
Don't include core-js for default _document (vercel#10187)
* Don't include core-js for default _document * update taskfile.js Co-authored-by: Joe Haddad <timer150@gmail.com>
1 parent 9b512a8 commit bea488f

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

packages/next/taskfile.js

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,36 @@ export async function nextbuildstatic(task, opts) {
185185
notify('Compiled export files')
186186
}
187187

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) {
189196
await task
190-
.source(opts.src || 'pages/**/*.+(js|ts|tsx)')
197+
.source('pages/_error.tsx')
191198
.babel(babelClientOpts)
192199
.target('dist/pages')
193200
}
194201

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+
195218
export async function telemetry(task, opts) {
196219
await task
197220
.source(opts.src || 'telemetry/**/*.+(js|ts|tsx)')

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy