-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.dev.js
32 lines (30 loc) · 1017 Bytes
/
webpack.config.dev.js
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
const getWebpackBaseConfig = require('./webpack.config.base');
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
let webpackDevConfig = getWebpackBaseConfig();
webpackDevConfig.devtool = 'inline-source-map';
webpackDevConfig.entry = [
'webpack-dev-server/client?http://localhost:8080',
'webpack/hot/only-dev-server',
'./dev/main'
];
webpackDevConfig.output.path = path.join(__dirname, 'dist');
webpackDevConfig.output.filename = 'bundle.js';
webpackDevConfig.plugins = [
new webpack.HotModuleReplacementPlugin(),
new HtmlWebpackPlugin({title: 'Simple List Item Range Selector'})
];
webpackDevConfig.module.loaders.push( {
test: /\.html$/,
loader: "raw-loader"
}, {
test: /\.css/,
use: ['style-loader', 'css-loader']
}
);
webpackDevConfig.devServer = {
contentBase: path.join(__dirname, "dist"),
hot: true
};
module.exports = webpackDevConfig;