-
-
Notifications
You must be signed in to change notification settings - Fork 556
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
Potentionally incorrect instructions in babel plugin #805
Comments
@Andarist ☝️ |
This note has actually been added recently in response to this issue. Basically, you can end up with different problems both ways - maybe, a better recommendation would be to use this: const config = {
plugins: [
commonjs({ include: /node_modules/ }),
babel({ babelHelpers: 'bundled' })
],
}; WDYT? Usually, people don't author CJS files anymore and |
Thanks so much for the context @Andarist! I didn't do much looking into the what or why of it, just tried adjusting the order and noticed that my error went away when babel came first. I tried your suggestion of putting |
Yes.
This is a separate thing and should work either way. |
Great, that did work for me. If this is a more universal solution, then I think this would be better to include in the docs. |
Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it. ⓘ |
Documentation Is:
Please Explain in Detail...
The babel plugin docs state in the "Using With
@rollup/plugin-commonjs
" that commonjs has to come before babel in theplugins
array if you're using both. This would be very helpful information if true, however I think following the guidance caused issues for me instead.Here is what my config was, based on the docs:
And running
rollup -c
resulted in a syntax error (which shouldn't be an issue):When I switched the order and put
babel
first, it successfully built.Your Proposal for Changes
If confirmed that this is true, this portion should be updated to say the opposite of what it does now, so:
The text was updated successfully, but these errors were encountered: