maxdavidson / rollup-plugin-sourcemaps

Rollup plugin for loading files with existing source maps
MIT License
65 stars 18 forks source link

Feature request { include, exclude } options applied to sourcemap sources #106

Open mcshaz opened 4 years ago

mcshaz commented 4 years ago

The FilterPattern applied to include or exclude seem to have no bearing on the sourcemap files included or excluded (instead being applied to the .js files).

It would be ideal to apply these filters so that sourcemaps could be excluded if they fit a pattern.

At the moment this can be done with the readfile option and passing to fs.readFile only if the path fits a predicate, but applying the include/exclude filters would seem a little cleaner.

Thanks for the library and thanks for considering.

GideonMax commented 1 year ago

@mcshaz I'm facing the same issue, may you please elaborate on the method using readfile?