Skip to content
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

webpack 4 problem #33

Closed
wulucxy opened this issue Nov 15, 2018 · 2 comments
Closed

webpack 4 problem #33

wulucxy opened this issue Nov 15, 2018 · 2 comments

Comments

@wulucxy
Copy link

wulucxy commented Nov 15, 2018

after I upgrade to webpack 4,I have encounter one problem:

actually I did not use this package。antd use it by default!

TypeError: _iconsReact2.default.add is undefined

the reason is _iconsReact2 is recognized as a commonjs version。

// Initial setting
_iconsReact2['default'].add.apply(_iconsReact2['default'], (0, _toConsumableArray3['default'])(Object.keys(allIcons).map(function (key) {
    return allIcons[key];
})));

if I change to _iconsReact2['default']['default'],it will work,so,what is solution here?

@wulucxy
Copy link
Author

wulucxy commented Nov 15, 2018

finally i resolve this problem by add { "libraryDirectory": "es"} and {"modules": false}。
so please close this issue。3x

@afc163
Copy link
Member

afc163 commented Nov 15, 2018

@wulucxy You can close it by youself.

@wulucxy wulucxy closed this as completed Nov 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants