-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
48 lines (44 loc) · 939 Bytes
/
webpack.config.js
File metadata and controls
48 lines (44 loc) · 939 Bytes
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
'use strict';
var path = require('path');
var webpack = require('webpack');
var PATHS = {
src: path.join(__dirname, 'src'),
build: path.join(__dirname, 'build')
};
module.exports = {
target: 'web',
cache: true,
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
path.join(PATHS.src, 'index.js')
],
output: {
path: PATHS.build,
publicPath: '/static/',
filename: 'bundle.js'
},
plugins: [
new webpack.HotModuleReplacementPlugin()
],
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loaders: ['react-hot', 'babel']
},
{
test: /\.scss$/,
include: /src/,
loaders: ["style", "css", "sass"]
}
]
},
debug: true,
devtool: 'eval-cheap-module-source-map',
devServer: {
contentBase: './build',
historyApiFallback: true
}
};