1 Star 0 Fork 0

huangxiaolun/reat-admin-重构

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
craco.config.js 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
const path = require("path");
const resolve = (dir) => path.resolve(__dirname, dir);
const sassResourcesLoader = require("craco-sass-resources-loader");
module.exports = {
style: {
sass: {
loaderOptions: {
sourceMap: true,
},
},
},
plugins: [
{
plugin: sassResourcesLoader,
options: {
resources: "./src/assets/css/index.scss",
},
},
],
webpack: {
alias: {
"@": resolve("src"),
assets: resolve("src/assets"),
common: resolve("src/common"),
components: resolve("src/components"),
router: resolve("src/router"),
services: resolve("src/services"),
store: resolve("src/store"),
views: resolve("src/views"),
utils: resolve("src/utils"),
},
},
// devServer: {
// host: 'localhost',//target host
// port: 5000,
// proxy: {
// [process.env.REACT_APP_API]: {
// target: `${process.env.REACT_APP_BASE_URL}`, //配置你要请求的服务器地址
// changeOrigin: true,
// pathRewrite: {
// [`^${process.env.REACT_APP_API}`]: "",
// },
// },
// },
// },
devServer: {
//这里用变量直接报错
host: "localhost", //target host
port: 5000,
proxy: {
"/devApi": {
target: "http://www.web-jshtml.cn/api/react", //配置你要请求的服务器地址
changeOrigin: true,
pathRewrite: {
"/devApi": "",
},
},
},
},
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/huangxiaolun/real-admin-refactoring.git
git@gitee.com:huangxiaolun/real-admin-refactoring.git
huangxiaolun
real-admin-refactoring
reat-admin-重构
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385