-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwebpack.dev.babel.js
More file actions
47 lines (45 loc) · 953 Bytes
/
Copy pathwebpack.dev.babel.js
File metadata and controls
47 lines (45 loc) · 953 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
import webpack from 'webpack';
import path from 'path';
const config = {
devtool: 'eval',
entry: [
'webpack-hot-middleware/client?reload=true&path=http://localhost:9000/__webpack_hmr',
'./components/app/index.js',
],
module: {
rules: [
{
test: /\.jsx?$/,
loader: 'babel-loader'
},
{
test: /\.png|\.svg$/,
loader: 'file-loader'
},
{
test: /\.scss$/,
loaders: ['style-loader', 'css-loader', 'sass-loader']
}
]
},
output: {
path: __dirname + '/dist',
publicPath: 'http://localhost:9000/dist/',
filename: 'bundle.js'
},
resolve: {
modules: [
path.join(__dirname, 'node_modules')
]
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('development')
}
}),
new webpack.HotModuleReplacementPlugin(),
],
target: 'web',
};
module.exports = config;