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
What's the differences between acorn build in rollup and real acorn? #3471
Comments
It is possible but it was a huge pain and caused its own bunch of issues. The way those broken plugins work is that they require acorn by themselves. Which may give them the correct acorn instance, or it may not. This caused quite a few issues not only for Rollup but also for Webpack (there was one issue with >100 people chiming in that was not really resolved for a very long time). Moreover, it made it impossible for us to support plugins in the browser build. And both installation and startup time of Rollup is now faster. The "fix" for these plugins is really simple and can be done via pull request by anyone. It is even linked in the release notes. Basically it is putting this one-liner in the right place: acornjs/acorn#870 (comment) The decision was to put pressure on the ecosystem so that these plugins are fixed at last and the aforementioned issues are resolved for good. |
To answer the original question, there is NO difference. Rollup aims to always bundle the latest version of acorn. |
Another point to add is that it would currently make Rollup unuseable in a Node 13+ ESM environment, at least as far as I tried. |
I see. So rollup just bundle the latest version acorn inside to enhance cooperativity, no any other hack modify to acorn api to achieve rollup internal aim which original acorn can't do? |
Exactly. It is completely unmodified except that it is hoisted into the remaining Rollup bundle. |
OK, then there will be no problem! |
Feature Use Case
There are many plugins can't use with rollup, just because rollup's built-in acorn edition.
Feature Proposal
I want to know, what's the necessity to build acorn in rollup? Is it possible to leave it in dependenciess?
Now I use
acornInjectPlugins: [ () => require('acorn').Parser ]
to hack that, but I'm not sure, will it cause rollup bug?The text was updated successfully, but these errors were encountered: