-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #2962 to properly build esm version for antd
- Updated `package*.json` to add `@rollup/plugin-replace` - Added a `dts.config.js` file that caused `antd/lib` and `rc-picker/lib` to be replaced with `antd/es` and `rc-picker/es` - Updated the `CHANGELOG.md` file for the fix
- Loading branch information
1 parent
1c46492
commit e1434b0
Showing
4 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const replace = require("@rollup/plugin-replace"); | ||
|
||
module.exports = { | ||
// This function will run for each entry/format/env combination | ||
rollup(config, options) { | ||
if (options.format === "esm") { | ||
config.plugins.push( | ||
replace({ | ||
"antd/lib": "antd/es", | ||
"rc-picker/lib": "rc-picker/es", | ||
}) | ||
); | ||
} | ||
return config; // always return a config. | ||
}, | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters