代码拉取完成,页面将自动刷新
/* eslint-disable @typescript-eslint/no-var-requires */
const CracoLessPlugin = require("craco-less");
process.env.PORT = 5000;
process.env.GENERATE_SOURCEMAP = "false";
process.env.FAST_REFRESH = false;
module.exports = {
babel: {
plugins: [
["@babel/plugin-proposal-decorators", { legacy: true }], //支持装饰器
[
"import",
{
libraryName: "antd",
libraryDirectory: "es",
style: true, //设置为true即是less
},
],
],
},
//配置代理
devServer: {
proxy: {
// 业务接口
"/app": {
target: "http://localhost:8888/app",
changeOrigin: true,
pathRewrite: {
"^/app": "",
},
},
// 后端管理接口
"/sys": {
target: "http://localhost:8888/sys",
changeOrigin: true,
pathRewrite: {
"^/sys": "",
},
},
},
},
plugins: [
{
plugin: CracoLessPlugin,
options: {
lessLoaderOptions: {
lessOptions: {
modifyVars: { "@primary-color": "#1DA57A" },
javascriptEnabled: true,
},
},
},
},
],
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。