rollup-plugin-imagemin
rollup-plugin-imagemin copied to clipboard
Prevent output of .js files when using images as entry points
I'm using a custom plugin to glob most of my source tree as input.
Problem is, when specifying non-javascript file as entry point, rollup still generates a bundle for it (often empty, depends on plugins).
Anyway even if this plugin didn't emit javascript code, there'd still be empty bundles.
So I propose a solution: detect when images are used as entry points and clean up auto generated javascript files at generateBundle
event.
I got a working solution, if you think this could be useful, I'll make a pull request.
Sorry for the late reply on this. If you still have a PR, I'd be open to it! I've been trying to do some much-needed housekeeping on my repos as of late.
I'm sorry, I haven't used rollup in a while and I have pretty much no recollection of the code involved so making a PR at this point is not possible.
No worries. I let this languish for a while anyway, but based on your initial issue, I think I have a way to get this done. Thanks!