-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.dev.config.js
More file actions
30 lines (24 loc) · 838 Bytes
/
webpack.dev.config.js
File metadata and controls
30 lines (24 loc) · 838 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
const path = require('path');
const config = require('./webpack.base.config.js');
const addAssetHtmlPlugin = require('add-asset-html-webpack-plugin');
const progressPlugin = require('progress-bar-webpack-plugin');
const dlls = require('./config.js').dlls.map(item=>item.key).reverse();
config.module.rules.push({
test: /\.less?$/,
use: ['style-loader', 'css-loader', 'less-loader']
})
config.module.rules.push({
test: /\.css?$/,
use: ['style-loader', 'css-loader',]
})
//config.plugins.push(new progressPlugin());
dlls.forEach(key => {
config.plugins.push(new addAssetHtmlPlugin({
filepath: path.resolve(__dirname, `./dll/${key}/${key}.js`),
outputPath: './dll/',
publicPath: '../dll/',
includeSourcemap: false,
}));
});
config.devtool = 'source-map';
module.exports = config;