Skip to content

Commit

Permalink
fix: es folder import in cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
vagusX committed Nov 22, 2022
1 parent 0c6e0e8 commit cbec3ea
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .fatherrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ export default defineConfig({
cjs: { output: 'lib' },
esm: {
output: 'es',
alias: { 'rc-util/lib': 'rc-util/es' },
alias: {
'rc-util/lib': 'rc-util/es',
'antd/lib': 'antd/es',
},
},
});
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"dayjs": "^1.11.4"
},
"peerDependencies": {
"antd": "^5.0.0-beta.0",
"antd": "^5.0.0",
"react": ">=16.0.0",
"react-dom": ">=16.0.0"
},
Expand All @@ -59,7 +59,7 @@
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@umijs/fabric": "^2.5.2",
"antd": "next",
"antd": "^5.0.0",
"dumi": "^1.1.0",
"eslint": "^7.18.0",
"father": "^4.0.0-rc.8",
Expand Down
2 changes: 1 addition & 1 deletion src/comment/style/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { CSSInterpolation } from '@ant-design/cssinjs';
import { useStyleRegister } from '@ant-design/cssinjs';
import { theme as antdTheme, ConfigProvider } from 'antd';
import type { GlobalToken } from 'antd/es/theme/interface';
import { resetComponent } from 'antd/es/style';
import { resetComponent } from 'antd/lib/style';

interface MergedToken extends GlobalToken {
componentCls: string;
Expand Down
2 changes: 1 addition & 1 deletion src/theme/convertLegacyToken.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Source:
// https://github.com/ant-design/ant-design/blob/2c9fbc8f0c714c9de27fc2f54712acb69ac1abd8/components/style/themes/default.less
import type { MapToken } from 'antd/es/theme/interface';
import formatToken from 'antd/es/theme/util/alias';
import formatToken from 'antd/lib/theme/util/alias';

export default function convertLegacyToken(mapToken: MapToken) {
const token = formatToken(mapToken as any);
Expand Down

0 comments on commit cbec3ea

Please sign in to comment.