mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 23:32:38 +00:00
feat: make babel-loader exclude configurable
This commit is contained in:
parent
7d92486a07
commit
021ba5a1e2
@ -40,6 +40,7 @@ export default class WebpackBaseConfig {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete options.exclude
|
||||||
return options
|
return options
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,10 +140,7 @@ export default class WebpackBaseConfig {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.jsx?$/,
|
test: /\.jsx?$/,
|
||||||
exclude: file => (
|
exclude: this.options.build.babel.exclude,
|
||||||
/node_modules/.test(file) &&
|
|
||||||
!/\.vue\.js/.test(file)
|
|
||||||
),
|
|
||||||
use: perfLoader.pool('js', {
|
use: perfLoader.pool('js', {
|
||||||
loader: 'babel-loader',
|
loader: 'babel-loader',
|
||||||
options: this.getBabelOptions()
|
options: this.getBabelOptions()
|
||||||
|
@ -61,7 +61,11 @@ export default {
|
|||||||
},
|
},
|
||||||
babel: {
|
babel: {
|
||||||
babelrc: false,
|
babelrc: false,
|
||||||
cacheDirectory: undefined
|
cacheDirectory: undefined,
|
||||||
|
exclude: file => (
|
||||||
|
/node_modules/.test(file) &&
|
||||||
|
!/\.vue\.js/.test(file)
|
||||||
|
)
|
||||||
},
|
},
|
||||||
vueLoader: {},
|
vueLoader: {},
|
||||||
postcss: {},
|
postcss: {},
|
||||||
|
Loading…
Reference in New Issue
Block a user