-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
40 lines (37 loc) · 941 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 publicPath = 'http://localhost:3000/';
var hotMiddlewareScript = 'webpack-hot-middleware/client?reload=true';
var config = {
entry: ['./app/main.js', hotMiddlewareScript],
output: {
filename: 'bundle.js',
path: path.resolve('./app/public/scripts/'),
publicPath: publicPath
},
devtool: 'source-map',
module: {
loaders: [{
test: /\.jsx?$/,
loaders: ['babel']
}, {
test: /\.scss?$/,
loader: 'style!css!sass'
}, {
test: /\.css?$/,
loader: 'style!css'
}, {
// HTML LOADER
// Reference: https://github.com/webpack/raw-loader
// Allow loading html through js
test: /\.html$/,
loader: 'raw'
}]
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
]
};
module.exports = config;