-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathwebpack.config.js
More file actions
46 lines (44 loc) · 1.01 KB
/
webpack.config.js
File metadata and controls
46 lines (44 loc) · 1.01 KB
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
var path = require('path');
var webpack = require('webpack');
var values = require('postcss-icss-values');
// TODO (cw|11.3.2017) migrate from webpack 1.x.x -> 2.0.0
module.exports = {
devtool: 'inline-source-map',
resolve: {
modulesDirectories: ['node_modules', 'src'],
extensions: ['', '.js', '.jsx']
},
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./src/index.js'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
new webpack.HotModuleReplacementPlugin()
],
postcss: [
values
],
module: {
loaders: [
{
test: /\.js.*$/,
loader: 'babel',
exclude: /node_modules/
},
{
test: /\.css$/,
loader: 'style-loader!css-loader?modules&camelCase=dashes&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!'
},
{
test: /\.json$/,
loader: 'json-loader',
},
]
}
};