-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
38 lines (33 loc) · 836 Bytes
/
Copy pathwebpack.config.js
File metadata and controls
38 lines (33 loc) · 836 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
var Webpack = require('webpack');
var path = require('path');
var nodeModulesPath = path.resolve(__dirname, 'node_modules');
var buildPath = path.resolve(__dirname, 'client', 'build');
// var mainPath = path.resolve(__dirname, 'app', 'index.jsx');
var mainPath = path.resolve(__dirname, 'client', 'js', 'index.jsx');
module.exports = {
devtool: 'eval',
entry: [
'webpack/hot/dev-server',
'webpack-dev-server/client?http://localhost:8080',
mainPath
],
output: {
path: buildPath,
filename: 'bundle.js',
publicPath: '/build/'
},
module: {
loaders: [
{
test: /\.jsx?$/,
loader: 'babel',
exclude: [nodeModulesPath]
},
{
test: /\.scss$/,
loader: 'style!css!sass'
}
]
},
plugins: [new Webpack.HotModuleReplacementPlugin()]
};