-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.dev.js
More file actions
34 lines (31 loc) · 754 Bytes
/
webpack.dev.js
File metadata and controls
34 lines (31 loc) · 754 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
const path = require('path');
const { merge } = require('webpack-merge');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const common = require('./webpack.common.js');
module.exports = merge(common, {
mode: 'development',
devServer: {
static: { directory: path.join(__dirname, 'dist') },
port: 9000,
hot: true,
},
devtool: 'inline-source-map',
module: {
rules: [
{
test: /\.less$/,
use: [
'css-hot-loader',
MiniCssExtractPlugin.loader,
'css-loader',
'less-loader',
],
exclude: /node_modules/,
},
],
},
plugins: [new MiniCssExtractPlugin({ filename: '[name].css' })],
output: {
filename: '[name].js',
},
});