Clean up code/testing artifacts from #7014 (#7211)

This commit is contained in:
Keanu Lee 2019-05-01 11:56:35 -07:00 committed by JJ Kasper
parent d120f14d1c
commit d0ca9c9eb5
5 changed files with 7 additions and 49 deletions

View file

@ -374,13 +374,7 @@ export default async function getBaseWebpackConfig(
/next[\\/]dist[\\/]pages/,
],
exclude: (path: string) => {
if (/next-server[\\/]dist[\\/]lib/.test(path)) {
return false
}
if (/next[\\/]dist[\\/]client/.test(path)) {
return false
}
if (/next[\\/]dist[\\/]pages/.test(path)) {
if (/next-server[\\/]dist[\\/]lib/.test(path) || /next[\\/]dist[\\/]client/.test(path) || /next[\\/]dist[\\/]pages/.test(path)) {
return false
}

View file

@ -103,19 +103,11 @@ module.exports = babelLoader.custom(babel => {
options.overrides = [
...(options.overrides || []),
{
test: /next-server[\\/]dist[\\/]lib/,
plugins: [
commonJsItem
]
},
{
test: /next[\\/]dist[\\/]client/,
plugins: [
commonJsItem
]
},
{
test: /next[\\/]dist[\\/]pages/,
test: [
/next-server[\\/]dist[\\/]lib/,
/next[\\/]dist[\\/]client/,
/next[\\/]dist[\\/]pages/
],
plugins: [
commonJsItem
]

View file

@ -1,11 +0,0 @@
{
"presets": [
["next/babel", {
"preset-env": {
"targets": {
"esmodules": true
}
}
}]
]
}

View file

@ -1,11 +0,0 @@
module.exports = {
'presets': [
['next/babel', {
'preset-env': {
'targets': {
'esmodules': true
}
}
}]
]
}

View file

@ -1,9 +1,3 @@
export default () => (
<div id='node-env'>{process.env.NODE_ENV}</div>
);
// Just some async function in app code. Depending on how this is transpiled,
// it can cause regenerator to be imported.
(async function () {
await console.log('hi')
})()
)