mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-17 16:38:18 +00:00
feature(webpack) babelify only for prod
This commit is contained in:
parent
6242966f44
commit
55c1299619
1 changed files with 11 additions and 8 deletions
|
|
@ -28,6 +28,16 @@ const plugins = clean([
|
|||
filename: 'cloudcmd.js',
|
||||
}),
|
||||
]);
|
||||
const loaders = clean([
|
||||
!isDev && {
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
loader: 'babel-loader',
|
||||
query: {
|
||||
presets: ['es2015']
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
||||
module.exports = {
|
||||
devtool,
|
||||
|
|
@ -58,14 +68,7 @@ module.exports = {
|
|||
externals
|
||||
],
|
||||
module: {
|
||||
loaders: [{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
loader: 'babel-loader',
|
||||
query: {
|
||||
presets: ['es2015']
|
||||
}
|
||||
}]
|
||||
loaders,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue