Package Exports
- @gzued/antd-compiled
- @gzued/antd-compiled/compiled/antd/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@gzued/antd-compiled) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@gzued/antd-compiled
预打包的 Ant Design 4.x 及其相关依赖,用于 @gzued 系列组件库。
特性
- 🚀 预打包优化: 将 antd 及其相关依赖预打包,减少重复构建
- 📦 体积优化: 通过 tree-shaking 和代码分割优化包体积
- 🔧 类型支持: 完整的 TypeScript 类型声明
- 🎯 版本统一: 确保所有 @gzued 包使用相同版本的 antd 依赖
包含的依赖
antd: ^4.24.14@ant-design/icons: ^4.8.0dayjs: ^1.11.10classnames: ^2.3.1
安装
npm install @gzued/antd-compiled
# 或
yarn add @gzued/antd-compiled使用方法
在 Father 配置中使用
// .fatherrc.ts
import { defineConfig } from 'father';
export default defineConfig({
prebundle: {
deps: {
antd: { dts: false },
'@ant-design/icons': { dts: false },
dayjs: { dts: false },
classnames: { dts: false },
},
},
alias: {
'antd': '@gzued/antd-compiled/antd',
'@ant-design/icons': '@gzued/antd-compiled/@ant-design/icons',
'dayjs': '@gzued/antd-compiled/dayjs',
'classnames': '@gzued/antd-compiled/classnames',
},
});在 Webpack 配置中使用
// webpack.config.js
module.exports = {
resolve: {
alias: {
'antd': '@gzued/antd-compiled/antd',
'@ant-design/icons': '@gzued/antd-compiled/@ant-design/icons',
'dayjs': '@gzued/antd-compiled/dayjs',
'classnames': '@gzued/antd-compiled/classnames',
},
},
};在 Vite 配置中使用
// vite.config.ts
import { defineConfig } from 'vite';
export default defineConfig({
resolve: {
alias: {
'antd': '@gzued/antd-compiled/antd',
'@ant-design/icons': '@gzued/antd-compiled/@ant-design/icons',
'dayjs': '@gzued/antd-compiled/dayjs',
'classnames': '@gzued/antd-compiled/classnames',
},
},
});开发
构建
npm run build发布
npm publish版本说明
版本号格式:{antd版本}.{补丁版本}
例如:4.24.14.0 表示基于 antd 4.24.14 的预打包版本。
许可证
MIT