rollup-plugin-cleanup
rollup-plugin-cleanup copied to clipboard
Oddly formatted Turf.js jsDoc comments not removed
I have no idea why, but Turf.js's jsDoc comments have multiple initial spaces after the initial /**:
/**
* Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
*
* @memberof helpers
* @type {number}
*/
This causes cleanup({ comments: 'none' }), to not remove them.
Is there a reasonable way for cleanup() to handle this?
Or could you post a regex that just might work? I tried it but my regex fu is lacking! :)
Oh, forgot: I get the Turf modules from unpkg using the urlResolve plugin, like this:
https://unpkg.com/@turf/[email protected]/dist/es/index.js?module
https://unpkg.com/@turf/boolean-point-in-polygon?module
...and so on
Note: I just did the same thing with skypack and it apparently did not have the odd format, so cleanup worked like a charm!