-
Notifications
You must be signed in to change notification settings - Fork 33
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
Rollup + Tree shaking throw an error #21
Comments
Thanks @TylorS! I don't have a lot of experience running Rollup. Perhaps @robwormald could chime in here? Rob, have you hit this issue before? |
Hey @Blesh thank you for the response. I found the solution today. The issue was the combination of plugins I was using. We are currently using the The commonjs plugin wraps all the packages it finds from your The solution was ignoring Thanks again for this library. |
I see. Thank you for providing feedback on your findings. Hopefully this issue will help someone else in a similar situation. |
I have the same issues since [email protected] updated its symbol-observable dependency. Your fix works @TylorS. So the issue is that rollup-plugin-commonjs wraps an already es6 module with import/exports into an es6 module with extra imports/exports? Shouldn't the rollup-plugin-commonjs be able to detect this, you think? |
Well, I se now that a few issues and even a PR fix by @Rich-Harris himself has already been made at rollup-plugin-commonjs github regarding this issue: |
Hello! First I'd just like to say thanks for maintaining this library! Very happy to use it for most.js
I spent some time experimenting with converting most.js' core codebase to ES2015 imports/exports to take advantage of tree-shaking for third-party libraries and applications that use it (PR here if interested). When I use rollup with a plugin to use node's import resolution (so it can find imports in node_modules) it has an option to use a packages
jsnext:main
as I'm sure you already know. However I have to disable it in our current configuration to allow things to build. I receive the following errorHere is the full error for sake of thoroughness
https://gist.github.com/TylorS/097632154b662778068ff8dc7c9852c7
This is not urgent for me as our build still currently requires using rollup's commonjs plugin and happily consumes this library, but that might not be the case for very long. I just wanted to let you know if this is in fact an issue with how things are exported or possibly you or someone else already knows the solution that I'm missing.
Thank you for your time :)
The text was updated successfully, but these errors were encountered: