Skip to content

Commit

Permalink
feat: re-export some antd components
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Feb 13, 2025
1 parent daae406 commit e09f7f4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
"./announcement": {
"types": "./dist/announcement/index.d.ts",
"import": "./dist/announcement/index.js"
},
"./antd": {
"types": "./dist/antd/index.d.ts",
"import": "./dist/antd/index.js"
}
},
"repository": {
Expand Down
14 changes: 13 additions & 1 deletion rslib.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default defineConfig({
lib: [
{
format: 'esm',
syntax: 'es2015',
syntax: 'es2018',
autoExternal: false,
banner: {
js: `import './index.css';`,
Expand All @@ -28,6 +28,18 @@ export default defineConfig({
},
},
},
// without banner
{
format: 'esm',
syntax: 'es2018',
autoExternal: false,
dts: true,
source: {
entry: {
antd: './src/antd/index.tsx',
},
},
},
],
output: {
target: 'web',
Expand Down
5 changes: 5 additions & 0 deletions src/antd/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Collapse from 'antd/es/collapse/Collapse';
// Re-export antd components
import ConfigProvider from 'antd/es/config-provider';

export { Collapse, ConfigProvider };

0 comments on commit e09f7f4

Please sign in to comment.