-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
62 lines (57 loc) · 1.34 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
var webpack = require('webpack');
var path = require('path');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: [
'babel-polyfill',
'webpack-dev-server/client?http://localhost:3001',
'webpack/hot/only-dev-server',
'./src/index.js'
],
module: {
loaders: [{
test: /\.js?$/,
exclude: /node_modules/,
loader: 'react-hot!babel'
},
{
test: /\.scss$/,
loaders: ["style", "css", "autoprefixer", "sass"]
},
{
test: /\.css$/,
loaders: ["style", "css"]
},
{test: /\.woff$/, loader: "url-loader?limit=100000"}
],
},
resolve: {
extensions: ['', '.js', '.jsx', '.scss'],
modulesDirectories: ['src', 'node_modules']
},
output: {
path: __dirname + '/build',
publicPath: '/build/',
filename: 'bundle.js'
},
devServer: {
contentBase: './build'
, hot: true
},
sasslint: {
configFile: '.sass-lint.yml',
emitWarning: false,
failOnError: true,
},
plugins: [
new ExtractTextPlugin("bundle.css"),
new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
__CLIENT__: true,
__SERVER__: false,
__DEVELOPMENT__: true,
__DEVTOOLS__: true // <-------- DISABLE redux-devtools HERE
}),
]
};