-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.dev.js
More file actions
35 lines (33 loc) · 744 Bytes
/
webpack.dev.js
File metadata and controls
35 lines (33 loc) · 744 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
const path = require('path');
const merge = require('webpack-merge');
const common = require('./webpack.config');
const BUILD_DIR = path.resolve(__dirname, 'dist');
module.exports = merge(common, {
output: {
path: BUILD_DIR,
filename: 'bundle.[hash].js',
chunkFilename: '[name].[hash].chunk.js',
publicPath: '/',
},
mode: 'development',
devtool: 'source-map',
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.scss$/,
use: ['style-loader', 'css-loader', 'sass-loader'],
},
],
},
devServer: {
contentBase: BUILD_DIR,
compress: true,
port: 3000,
historyApiFallback: true,
hot: true,
},
});