forked from rjsf-team/react-jsonschema-form
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix rjsf-team#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 efa063a
Showing
2 changed files
with
17 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
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. | ||
}, | ||
}; |
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