Repository navigation
fix: resolve antd to one copy in tests and Storybook - #340
Merged
Merged
Conversation
Provider sets the mll-ant prefix and the German locale on the ConfigProvider it imports from antd. jest resolved bare antd to antd/lib, while components importing antd/es/* read another context, so they rendered ant- classes and the default locale. Storybook compiles the sources with babel, where babel-plugin-import rewrote bare antd imports to antd/lib, the same split. The rollup bundle was fine, it resolves antd to antd/es. Imports now use antd/es throughout, jest maps bare antd to antd/es, and the plugin, which never ran on the TypeScript sources in the build, is gone. 🤖 Generated with Claude Code
spawnia
force-pushed
the
unify-antd-imports
branch
from
October 30, 2026 08:11
96d7fb5 to
12ea5fd
Compare
spawnia
marked this pull request as ready for review
October 30, 2026 08:30
mic-web
approved these changes
Oct 30, 2026
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 30, 2026
## [21.0.2](v21.0.1...v21.0.2) (2026-10-30) ### Bug Fixes * resolve antd to one copy in tests and Storybook ([#340](#340)) ([a4c961b](a4c961b))
|
🎉 This PR is included in version 21.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Providersets themll-antprefix and the German locale on the ConfigProvider it imports fromantd.In jest, bare
antdresolved toantd/lib, so components importingantd/es/*read another context and renderedant-classes and the default locale.The published bundle was not affected: rollup resolves
antdtoantd/es, and its source map lists oneconfig-provider/context.js.After this change the bundle no longer contains
antd/liblocale modules, andesm/index.cssis byte-identical.babel-plugin-import goes, because it only ever ran where it caused the split
@rollup/plugin-babelhandles only.jsfiles by default, so the plugin never touched the TypeScript sources in the build; rollup tree-shakes bareantdimports itself.Storybook compiles the sources with babel, where the plugin rewrote bare
antdimports toantd/lib, its defaultlibraryDirectory.If the build's babel extensions were ever widened, the plugin would have introduced the same split into the bundle.
For agents 🤖: in review by mic-web, merge after approval
src/Provider/index.test.tsxfails on master:FilledButtonandDatePickerrenderant-classes and noDatum auswählenplaceholder insideProvider.yarn build,yarn storybook:build.🤖 Generated with Claude Code