-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.js
43 lines (35 loc) · 1.2 KB
/
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
var WebpackBuildNotifierPlugin = require('webpack-build-notifier');
module.exports = {
entry: {
main: './static/js/main.js'
},
output: {
filename: "build.js",
path: __dirname + "/static/build/",
publicPath: '/static/build/'
},
module : {
loaders: [
{ test: /\.html$/, loader: 'to-string!html-loader' },
{ test: /\.css$/, loader: 'to-string!style-loader!css-loader' },
{ test: /\.scss$/, loader: 'to-string!style-loader!css-loader!sass-loader' },
{
test: /\.js(x?)$/, loader: 'babel-loader' ,
exclude: /(node_modules|vendor)/,
query: {
presets: [ 'es2015' , 'stage-0' ],
}
},
{ test: /\.(png|woff|woff2|eot|ttf|svg|json)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: 'file-loader?limit=100000&name=fonts/[hash].[ext]' }
]
},
resolve: {
extensions: ['', '.webpack.js', '.web.js', '.ts', '.tsx', '.js', '.css', '.scss', '.sass']
},
plugins: [
new WebpackBuildNotifierPlugin({
suppressWarning: true,
activateTerminalOnError :true
})
]
};