6 Star 17 Fork 3

Jay_Ohhh / 个人后台管理系统 admin(React Rreact hooks React-Router Redux TypeScript)

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
craco.config.js 865 Bytes
一键复制 编辑 原始数据 按行查看 历史
Jay_Ohhh 提交于 2021-04-05 19:35 . '分析(Bundle)包大小'
const CracoAntDesignPlugin = require('craco-antd')
const path = require('path')
const webpackPlugins = []
if (process.env.NODE_ENV === 'production') {
// 打包分析
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
// npm run build的时候浏览器会自动打开9090端口的一个页面显示当前依赖包的各种大小拼图
webpackPlugins.push(new BundleAnalyzerPlugin({ analyzerPort: 9090 }))
}
module.exports = {
webpack: {
// 别名
alias: {
'@': path.resolve(__dirname, 'src'),
'react': path.resolve('./node_modules/react'),
},
plugins: webpackPlugins,
},
plugins: [
// antd:https://ant.design/docs/react/use-in-typescript-cn
{
plugin: CracoAntDesignPlugin,
options: {
customizeTheme: {
'@primary-color': '#1890FF',
},
},
},
],
}
1
https://gitee.com/Jay_Ohhh/carefree-admin.git
git@gitee.com:Jay_Ohhh/carefree-admin.git
Jay_Ohhh
carefree-admin
个人后台管理系统 admin(React Rreact hooks React-Router Redux TypeScript)
master

搜索帮助