DocSpring / craco-antd

A craco plugin to use Ant Design with create-react-app
MIT License
234 stars 49 forks source link

allow libraryDirectory as option #49

Closed DavidNorena closed 3 years ago

DavidNorena commented 3 years ago

Hi,

Using this plugin, I've just updated antd and @ant-design/pro-tables to the current last versions.

But I'm facing the issue where no longer the internationalization configuration is working almost like this issue:

https://github.com/ant-design/pro-table/issues/256#issuecomment-709516678

After a lot of test and failure I found the issue is here:

https://github.com/DocSpring/craco-antd/blob/master/lib/craco-antd.js#L91

Changing manually the libraryDirectory from "lib" to "es" seems to fix the error.

Is there a way to make that libraryDirectory modifiable by the user ?

I can help with a PR if you agree :)

Thanks in advance.

ndbroadbent commented 3 years ago

Hello, yes I think that would be a great idea to make the directory configurable. A PR would be great if you could help with that! Thanks!

DavidNorena commented 3 years ago

@ndbroadbent done and ready for you to review :)

ndbroadbent commented 3 years ago

Fixed, thanks!