-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
44 lines (42 loc) · 1006 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
'use strict';
var webpack = require('webpack');
module.exports = {
devtool: 'eval',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./scripts/index'
],
output: {
path: __dirname + '/build/',
filename: 'bundle.js',
publicPath: '/build/'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
resolve: {
extensions: ['', '.js', '.jsx', '.css', '.scss']
},
module: {
loaders: [
{ test: /\.jsx$/, loaders: [
'react-hot',
'jsx?harmony',
'babel-loader',
], exclude: /node_modules/ },
{ test: /\.js$/, loaders: [
'react-hot',
'jsx?harmony',
'babel-loader',
], exclude: /node_modules/ },
{ test: /\.css$/, loaders: [
'style-loader',
'css-loader',
'autoprefixer-loader',
], exclude: /node_modules/ },
{ test: /\.scss$/, loader: "style!css!sass" },
]
},
};