-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Antd 4.0+ support #402
Comments
{
"libraryName": "antd",
+ "libraryDirectory": "es",
"style": true
}, |
Adding
I'm using Next.Js if it matters |
@afc163 if the solution is to add the library pass the config (as mentioned in #402 (comment)) I think we should add that to the readme. If you agree, please reopen this ticket and I will PR the readme to include the additional explanation. But in order to write that explanation, I would need to understand why the |
@dgreene1 The CRA seems to transpile the imports. (This seems odd so I am going to dig into the CRA's webpack config to see how this is actually happening.) However, Jest does not and will throw an error like this.:
...which would require us to configure |
@vjpr can you describe the babel-best configuration part more so future readers can understand how to get around this error? |
@dgreene1 Working on the fix now - will report back when I figure it out. Looks like this is the solution: https://jestjs.io/docs/en/configuration.html#transformignorepatterns-arraystring
|
@chemicalkosek's issue was that they are using next and the es modules are not being transpiled by the webpack config. |
@vjpr disabling |
I've installed plugin:
and added this part to babelrc plugin section:
The bundle size is increased by 1mb.
The text was updated successfully, but these errors were encountered: