-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathwebpack.dev.config.js
More file actions
37 lines (36 loc) · 831 Bytes
/
webpack.dev.config.js
File metadata and controls
37 lines (36 loc) · 831 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
const autoprefixer = require('autoprefixer');
const path = require('path');
const webpack = require('webpack');
module.exports = {
devtool: 'eval',
entry: [
'webpack/hot/dev-server',
'./src/entrypoint',
],
output: {
filename: 'bundle.js',
publicPath: '/build/',
},
plugins: [new webpack.HotModuleReplacementPlugin()],
module: {
loaders: [
{
test: /\.js$/,
loaders: ['babel'],
include: [path.resolve(__dirname, 'src')],
},
{
test: /\.scss$/,
loaders: ['style', 'css?localIdentName=react-tween-[name]-[local]&modules', 'postcss', 'sass'],
include: [path.resolve(__dirname, 'src')],
},
],
},
devServer: {
port: 8080,
hot: true,
inline: true,
historyApiFallback: true,
},
postcss: [autoprefixer],
};