Skip to content

Commit

Permalink
Don't include core-js for default _document (#10187)
Browse files Browse the repository at this point in the history
* Don't include core-js for default _document

* update taskfile.js

Co-authored-by: Joe Haddad <timer150@gmail.com>
  • Loading branch information
timneutkens and Timer committed Jan 21, 2020
1 parent 9b512a8 commit bea488f
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions packages/next/taskfile.js
Expand Up @@ -185,13 +185,36 @@ export async function nextbuildstatic(task, opts) {
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
.source(opts.src || 'pages/**/*.+(js|ts|tsx)')
.source('pages/_error.tsx')
.babel(babelClientOpts)
.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) {
await task
.source(opts.src || 'telemetry/**/*.+(js|ts|tsx)')
Expand Down

0 comments on commit bea488f

Please sign in to comment.