forked from abinavseelan/react-input-trigger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.dev.config.js
28 lines (26 loc) · 898 Bytes
/
webpack.dev.config.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
const webpack = require('webpack');
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const merge = require('webpack-merge');
const commonConfiguration = require('./webpack.common.config');
module.exports = merge.strategy({ entry: 'replace' })(commonConfiguration, {
entry: { app: path.resolve(__dirname, 'src', 'docs', 'index.js'), },
context: path.resolve(__dirname, 'src', 'docs'),
devtool: 'cheap-eval-source-map', // transformed code (lines only),
devServer: {
contentBase: path.resolve(__dirname, 'docs'),
port: 3000,
hot: true,
open: true,
},
output: {
path: path.resolve(__dirname, 'docs'),
publicPath: '/',
filename: '[name].js',
},
plugins: [
new HtmlWebpackPlugin({ template: './index.html' }),
new webpack.NamedModulesPlugin(), // for HMR
new webpack.HotModuleReplacementPlugin(),
],
});