Skip to content

Commit

Permalink
fix: 🐛 更改打包方式
Browse files Browse the repository at this point in the history
  • Loading branch information
G committed Dec 15, 2023
1 parent a506c57 commit 1ac4074
Show file tree
Hide file tree
Showing 6 changed files with 1,315 additions and 111 deletions.
8 changes: 7 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@
- [ ] 微前端接入
- [ ] 模板编写

#### 组件库设计阶段
### 第一阶段:组件库设计阶段

- [x] 完成组件库编写和测试
- [x] 升级antd4 => antd5, 升级react与dumi、umi为最新版;
- [x] 完成组件库自动发布npm
- [ ] 发布组件库文档
- [ ] 发布gitPage

### 第二阶段: react-antd-admin模板搭建

- [ ] 技术选型

- [ ] 框架设计
3 changes: 3 additions & 0 deletions packages/gbeata/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env"]
}
33 changes: 14 additions & 19 deletions packages/gbeata/.fatherrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,21 @@ import { defineConfig } from 'father';

export default defineConfig({
// more father config: https://github.com/umijs/father/blob/master/docs/config.md
cjs: {
output: 'lib',
// input: 'src/index.ts',
},
esm: {
output: 'es',
// input: 'src/index.ts',
},
umd: {
output: 'dist',
entry: 'src/index.ts',
ignores: [
'src/**/*.md', // 避免打包demo文件到npm包里面
],
},
// extraBabelPlugins: [
// [
// 'babel-plugin-import',
// {
// libraryName: 'antd',
// libraryDirectory: 'es',
// style: true,
// },
// ],
// ],
// 打包的时候自动引入antd的样式链接
extraBabelPlugins: [
[
'babel-plugin-import',
{
libraryName: 'antd',
libraryDirectory: 'es',
style: true,
},
],
],
});
1 change: 1 addition & 0 deletions packages/gbeata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"dumi-theme-antd-style": "^0.29.7"
},
"devDependencies": {
"@babel/preset-env": "^7.23.6",
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.1.0",
"@types/classnames": "^2.3.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/gbeata/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"lib": ["ESNext", "DOM"],
"rootDirs": ["src", "docs"],
"strict": true,
"declaration": true,
Expand Down
Loading

0 comments on commit 1ac4074

Please sign in to comment.