-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
40 lines (35 loc) · 891 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
var webpack = require('webpack');
var path = require('path');
var PATHS = {
client: path.join(__dirname, 'client/javascripts/app.module.js'),
build: path.join(__dirname, 'build'),
styles: path.join(__dirname, 'client/stylesheets/main.scss')
}
var config = {
entry: "./client/javascripts/app.module.js",
output: {
filename: "./client/bundle.js"
},
plugins: [
new webpack.DefinePlugin({
ON_TEST: process.env.NODE_ENV === 'test'
})
],
module: {
loaders: [
{
exclude: /(node_modules|bower_components|stylesheets)/,
loader: 'ng-annotate!babel?presets=es2015'
},
// Load SCSS
{ test: /\.html$/,
loader: 'raw',
exclude: /node_modules|stylesheets/
}
]
}
}
if(process.env.NODE_ENV === 'production') {
config.plugins.push(new webpack.optimize.UglifyJsPlugin());
}
module.exports = config