-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcraco.config.js
43 lines (40 loc) · 971 Bytes
/
craco.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
41
42
43
// craco.config.js
const CracoLessPlugin = require("craco-less");
// const webpack = require("webpack");
const WebpackBar = require("webpackbar");
const MomentLocalesPlugin = require("moment-locales-webpack-plugin");
module.exports = {
webpack: {
plugins: [
new WebpackBar(),
new MomentLocalesPlugin({ localesToKeep: ["zh-CN", "es-us"] }),
],
},
babel: {
plugins: [
["import", { libraryName: "antd", libraryDirectory: "es", style: "css" }],
// [
// "import",
// {
// libraryName: "@ant-design/icons",
// libraryDirectory: "es",
// style: "css",
// },
// ],
["@babel/plugin-proposal-decorators", { legacy: true }],
],
},
plugins: [
{
plugin: CracoLessPlugin,
options: {
lessLoaderOptions: {
lessOptions: {
modifyVars: {},
javascriptEnabled: true,
},
},
},
},
],
};