bundle-collapser icon indicating copy to clipboard operation
bundle-collapser copied to clipboard

Option to define custom require method or blacklisting strings

Open niksy opened this issue 9 years ago • 1 comments

I’m using Nunjucksify and I have the problem described in this issue. Since I believe plugin runs after all transforms are applied, it can’t know about additional created requires - in the case of Nunjucks, it’s env.getTemplate({module-name}).

Is it possbile to have option to define custom require method or option to blacklist particular strings inside requires? That way bundle-collapser will just ignore those modules.

niksy avatar Aug 28 '15 15:08 niksy

I’ve created pull request for this issue. Implementation could be changed if you would like more expressive or easier approach. Also, it works only from API, I don’t know how it could be achieved from CLI (other than providing some configuration file).

niksy avatar Sep 06 '15 09:09 niksy