-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
40 lines (40 loc) · 926 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
36
37
38
39
40
/*
* @Descripttion:
* @version:
* @Author: peng
* @Date: 2021-05-19 14:29:47
* @LastEditors: peng
* @LastEditTime: 2021-05-19 18:03:16
*/
const path = require("path");
// const { getThemeVariables } = require("antd/dist/antd.less");
module.exports = {
entry: path.join(__dirname, "./src/index.js"),
output: {
path: path.join(__dirname, "./dist"),
filename: "bundle.js",
},
module: {
rules: [
{
test: /\.jsx?$/,
loader: "babel-loader",
},
{
test: /\.css$/,
loader: "style-loader!css-loader",
},
{
test: /\.less$/,
loader: "less-loader", // compiles Less to CSS
// options: {
// modifyVars: getThemeVariables({
// dark: true, // 开启暗黑模式
// compact: true, // 开启紧凑模式
// }),
// javascriptEnabled: true,
// },
},
],
},
};