-
Notifications
You must be signed in to change notification settings - Fork 102
/
webpack.config.js
50 lines (42 loc) · 975 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
45
46
47
48
49
50
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",
},
performance: {
hints: false,
maxEntrypointSize: 512000,
maxAssetSize: 512000
},
resolve: {
extensions: ['.js']
},
optimization: {
splitChunks: { chunks: 'all', name: 'vendors~sampleapp' },
},
module: {
rules: [
{
test: /\.js$/,
use: ["source-map-loader"],
enforce: "pre",
exclude: [/@uirouter/]
},
{
test: /\.js$/,
exclude: /(node_modules)/,
use: { loader: 'babel-loader' },
}
]
},
};