forked from codeocelot/react-reflux-webpack-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
47 lines (47 loc) · 924 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
var webpack = require('webpack')
module.exports = {
devtool:'eval',
entry: [
'./js/index.js',
'./style/style.scss'
],
output:{
filename:'bundle.js',
path:__dirname + '/dist',
publicPath: 'http://localhost:8080/dist/'
},
plugins: [
// kills the compilation upon an error.
// this keeps the outputed bundle **always** valid
new webpack.NoErrorsPlugin(),
],
module:{
loaders:[
{
test:/\.js?$/,
exclude:/node_modules/,
loader:'babel',
query:{
presets:['react','es2015'/*Enable for ES7*/,'stage-0']
}
},
{
test:/\.js$/,
loader:"eslint-loader",
exclude:"/node_modules/"
},
{
test: /\.scss$/,
loaders: ["style", "css", "sass"]
},
// USE THIS IF YOU'RE USING VANILLA CSS
// {
// test:/\.css$/,
// loaders:["style","css"]
// },
{test : /\.(ttf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
loader : 'file-loader'
}
]
}
}