parent
d120f14d1c
commit
d0ca9c9eb5
5 changed files with 7 additions and 49 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
]
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"presets": [
|
||||
["next/babel", {
|
||||
"preset-env": {
|
||||
"targets": {
|
||||
"esmodules": true
|
||||
}
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
module.exports = {
|
||||
'presets': [
|
||||
['next/babel', {
|
||||
'preset-env': {
|
||||
'targets': {
|
||||
'esmodules': true
|
||||
}
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
|
@ -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')
|
||||
})()
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue