Comments (5)
Thanks for this, @aMarCruz! Following those steps fixed the issue in my project.
I'm looking forward to seeing your permanent solution.
from rollup-plugin-cleanup.
@jcowman2 , rollup-plugin-cleanup v3.1.0 is in npm.
The solution was to write js-cleanup to replace acorn.
Details in the Changelog.
Please ping me for any issue with this.
from rollup-plugin-cleanup.
Confirmed, everything is working in the new plugin version. Thanks again, @aMarCruz 😄
from rollup-plugin-cleanup.
@jcowman2 , I will check it this weekend,
thanks for your feedback.
from rollup-plugin-cleanup.
@jcowman2 , I'm working on this issue right now.
The current rollup 0.66.6 (branch master) is using acorn@^5.7.0 and embeding acorn-dynamic-import@^3.0.0 and acorn-import-meta@^0.2.1 so I will do it the same.
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 useInternalAcorn
.
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 acorn-dynamic-import/lib/inject
.
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.
from rollup-plugin-cleanup.
Related Issues (20)
- Errors out on spread operator HOT 5
- Pass more options to acorn parser HOT 6
- Not cleaning up properly /**/ comments HOT 3
- comments: 'none' not removing all comments HOT 3
- Version 3.1.0 fails for certain template literals HOT 2
- rollup hang up when running with this plugin in node.js HOT 10
- Is this plugin still maintained? HOT 2
- when i use comments: 'none', but comments still removed HOT 2
- Does not remove comments generated by Babel
- Oddly formatted Turf.js jsDoc comments not removed HOT 2
- Using hooks as filters
- 'lineEndings: "mac"' disrupts generated sourcemap
- Doesn't work for d.ts files
- Options typing
- Maintain comments starting with /*! HOT 5
- Rollup.js: cleanup didn't generate a sourcemap for the transformation HOT 2
- Empty line after deleting comment HOT 5
- blank lines within template literals are erroneously removed HOT 2
- feature request: removing arbitrary chunks of code HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rollup-plugin-cleanup.