forked from ui-router/sample-app-angularjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
44 lines (37 loc) · 852 Bytes
/
webpack.config.js
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
33
34
35
36
37
38
39
40
41
42
43
44
var webpack = require('webpack');
var path = require('path');
var DEV_SERVER = process.argv[1].indexOf('webpack-dev-server') !== -1;
var DEV = DEV_SERVER || process.env.DEV;
module.exports = {
mode: DEV ? 'development' : 'production',
entry: {
"sampleapp": "./app/bootstrap/bootstrap.js",
},
devtool: DEV ? 'eval' :'source-map',
output: {
path: path.join(__dirname, "_bundles"),
publicPath: '_bundles/',
filename: "[name].js",
},
resolve: {
extensions: ['.js']
},
optimization: {
splitChunks: { chunks: 'all', },
},
module: {
rules: [
{
test: /\.js$/,
use: ["source-map-loader"],
enforce: "pre",
exclude: [/@uirouter/]
},
{
test: /\.js$/,
exclude: /(node_modules)/,
use: { loader: 'babel-loader' },
}
]
},
};