-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.dev.config.js
More file actions
36 lines (33 loc) · 940 Bytes
/
webpack.dev.config.js
File metadata and controls
36 lines (33 loc) · 940 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
var webpack = require('webpack');
var path = require('path');
var node_modules_dir = path.resolve(__dirname, 'node_modules');
var publicPath = 'http://127.0.0.1:3000/';
var hotMiddlewareScript = 'webpack-hot-middleware/client?reload=true';
var config = {
entry: [ hotMiddlewareScript, './client/index.js'],
output: {
path: path.resolve(__dirname, './server/public/static/js/'),
filename: 'bundle.js',
publicPath: publicPath
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader?presets[]=es2015&presets[]=react'
},
{
test: /\.css$/,
exclude: /node_modules/,
use: ['style-loader','css-loader']
}
]
},
plugins: [
// new webpack.optimize.OccurenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin()
]
};
module.exports = config;