appbaseio / reactivesearch

Search UI components for React and Vue
https://opensource.appbase.io/reactivesearch
Apache License 2.0
4.9k stars 468 forks source link

Verify and update tree shaking guide for babel 7 #532

Open divyanshu013 opened 6 years ago

divyanshu013 commented 6 years ago

Issue Type:

Enhancement

Platform:

Web

Description:

Currently we recommend using babel-plugin-direct-import. I'm noticing issues making it work with babel 7. We would need to verify a setup with babel 7 for tree shaking and update the docs.

Reactivesearch version: x.y.z

2.9.0

Anything else:

Currently it throws an error like: image

Workaround for this is to avoid tree-shaking with babel 7

metagrover commented 6 years ago

Have you tried using the bridge?

divyanshu013 commented 6 years ago

This error is thrown by babel while parsing the rc file so bridge won't help. There is some progress going in the next branch https://github.com/umidbekkarimov/babel-plugin-direct-import/tree/next. I think https://github.com/ant-design/babel-plugin-import could also work. Need to see which one works when I've more time.