-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpackfile.js
More file actions
32 lines (28 loc) · 1.03 KB
/
webpackfile.js
File metadata and controls
32 lines (28 loc) · 1.03 KB
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
29
30
31
32
/**
* Provides configuration for the [`webpack`](https://webpack.github.io/) module bundler.
* Copied from [`Angular 2 Starter`](https://angularclass.github.io/angular2-webpack-starter/)
* commit [`2b29948`](https://github.com/AngularClass/angular2-webpack-starter/blob/918a2c912533b98da9bdc17c906ff2a96189aaab/webpack.config.js).
* Incorporates webpack 2 features as specified in [What's new in webpack 2](https://gist.github.com/sokra/27b24881210b56bbaff7)
* @author Latticework <latticework@outlook.com>
*/
exports (options) => {
return new Promise((resolve, reject) => {
switch (options.environment) {
case "production":
}
switch (process.env.NODE_ENV) {
case 'prod':
case 'production':
module.exports = require('./config/webpack.prod');
break;
case 'test':
case 'testing':
module.exports = require('./config/webpack.test');
break;
case 'dev':
case 'development':
default:
module.exports = require('./config/webpack.dev');
}
}
}