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
|
||||
}
|
||||
|
||||
@ -139,10 +140,7 @@ export default class WebpackBaseConfig {
|
||||
},
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
exclude: file => (
|
||||
/node_modules/.test(file) &&
|
||||
!/\.vue\.js/.test(file)
|
||||
),
|
||||
exclude: this.options.build.babel.exclude,
|
||||
use: perfLoader.pool('js', {
|
||||
loader: 'babel-loader',
|
||||
options: this.getBabelOptions()
|
||||
|
@ -61,7 +61,11 @@ export default {
|
||||
},
|
||||
babel: {
|
||||
babelrc: false,
|
||||
cacheDirectory: undefined
|
||||
cacheDirectory: undefined,
|
||||
exclude: file => (
|
||||
/node_modules/.test(file) &&
|
||||
!/\.vue\.js/.test(file)
|
||||
)
|
||||
},
|
||||
vueLoader: {},
|
||||
postcss: {},
|
||||
|
Loading…
Reference in New Issue
Block a user