Commit bea488f0 authored by Tim Neutkens's avatar Tim Neutkens Committed by Joe Haddad

Don't include core-js for default _document (#10187)

* Don't include core-js for default _document

* update taskfile.js
Co-authored-by: 's avatarJoe Haddad <timer150@gmail.com>
parent 9b512a85
...@@ -185,13 +185,36 @@ export async function nextbuildstatic(task, opts) { ...@@ -185,13 +185,36 @@ export async function nextbuildstatic(task, opts) {
notify('Compiled export files') notify('Compiled export files')
} }
export async function pages(task, opts) { export async function pages_app(task) {
await task
.source('pages/_app.tsx')
.babel(babelClientOpts)
.target('dist/pages')
}
export async function pages_error(task) {
await task await task
.source(opts.src || 'pages/**/*.+(js|ts|tsx)') .source('pages/_error.tsx')
.babel(babelClientOpts) .babel(babelClientOpts)
.target('dist/pages') .target('dist/pages')
} }
export async function pages_document(task) {
const babelOpts = {
...babelServerOpts,
presets: [...babelServerOpts.presets, '@babel/preset-react'],
}
await task
.source('pages/_document.tsx')
.babel(babelOpts)
.target('dist/pages')
}
export async function pages(task, opts) {
await task.parallel(['pages_app', 'pages_error', 'pages_document'])
}
export async function telemetry(task, opts) { export async function telemetry(task, opts) {
await task await task
.source(opts.src || 'telemetry/**/*.+(js|ts|tsx)') .source(opts.src || 'telemetry/**/*.+(js|ts|tsx)')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment