forked from hminghe/weex-amui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
28 lines (28 loc) · 774 Bytes
/
webpack.config.js
File metadata and controls
28 lines (28 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// You can see all the config in `./configs`.
const buildPlugins = require('./configs/plugin');
let webpackConfig;
module.exports = env => {
switch (env.NODE_ENV) {
case 'prod':
case 'production':
webpackConfig = require('./configs/webpack.prod.conf');
break;
case 'test':
case 'testing':
webpackConfig = require('./configs/webpack.test.conf');
break;
case 'plugin':
buildPlugins();
case 'common':
webpackConfig = require('./configs/webpack.common.conf');
break;
case 'release':
webpackConfig = require('./configs/webpack.release.conf');
break;
case 'dev':
case 'development':
default:
webpackConfig = require('./configs/webpack.dev.conf');
}
return webpackConfig;
}