-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathwebpack.config.js
35 lines (35 loc) · 897 Bytes
/
webpack.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
29
30
31
32
33
34
35
var conf = require("./core/config")
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
mode: conf.mode,
entry: {
"show.js": "./js/show.js",
"crawling.js": "./js/crawling.js",
"about.js": "./js/about.js",
"search.js": "./js/search.js",
},
output: {
filename: "[name]"
},
module: {
rules: [
{
test: /\.less$/,
use: [MiniCssExtractPlugin.loader, 'css-loader', 'less-loader'],
}
]
},
node: {
// fs: "empty"
},
plugins: [
new MiniCssExtractPlugin({
linkType: false,
filename: x => {
var targetName = x.chunk.name;
var name = targetName.slice(0, targetName.lastIndexOf("."))
return name + ".css"
}
}),
]
}