-
Notifications
You must be signed in to change notification settings - Fork 5
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
Using Acorn plugins doesn't work as specified by README #13
Comments
@jcowman2 , I will check it this weekend, |
@jcowman2 , I'm working on this issue right now. Anyway, my solution to support acorn plugins was not good 'cause it is at very low level, I think something like the rollup's "acornInjectPlugins" option is better, perhaps in automatic mode. Also, it is possible to use Rollup's internal acorn instance to parse the code, which would solve compatibility problems (if it works for rollup, works for cleanup) ...but only in latest versions. Maybe it can be used with an option like In the meantime, please remove "acorn" from your devDependencies (it is already installed by rollup) and downgrade dynamic import to "^3.0.0" to use Note: fot this, it is better to edit the package.json, delete node_modules and the package-lock.json or yarn.lock and reinstall. I will leave this issue open until a rn-cleanup version has been published that solves these problems, hope in a few days. |
Thanks for this, @aMarCruz! Following those steps fixed the issue in my project. I'm looking forward to seeing your permanent solution. |
@jcowman2 , rollup-plugin-cleanup v3.1.0 is in npm. The solution was to write js-cleanup to replace acorn. Please ping me for any issue with this. |
…es to use updated rollup-plugin related aMarCruz/rollup-plugin-cleanup#13
Confirmed, everything is working in the new plugin version. Thanks again, @aMarCruz 😄 |
Hey there, I'm having trouble using the
acorn-dynamic-import
plugin using the example in your README (related #11).First off, the following line is no longer accurate:
It throws
Error: Cannot find module 'acorn-dynamic-import/lib/inject'
, seemingly because the file was renamed tolib/walk
. That can be fixed by updating the import to the following:However, now I'm getting the following error:
After doing some digging, it looks like this is the result of a pre-existing issue with acorn: acornjs/acorn#746. The closure compiler Rollup plugin ran into the same problem (ampproject/rollup-plugin-closure-compiler#48), so maybe their solution could be useful.
Steps to Reproduce
npm install
npm run build
Full
rollup.config.js
:Full error:
The text was updated successfully, but these errors were encountered: