2 Star 1 Fork 1

易灵/react-client-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
craco.config.js 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
LiYiLin 提交于 2022-04-12 17:45 +08:00 . 引入redux,并测试使用
/* 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,
},
},
},
},
],
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/yilin-codes/react-client.git
git@gitee.com:yilin-codes/react-client.git
yilin-codes
react-client
react-client-demo
master

搜索帮助