I’m looking at adding a theme system to my application. Because there would be anywhere from 1 to 100 themes, I do not want all of their template code included in the monolithic bundle. I’m looking for a way to bake them as separate bundles.
I have tried to use the dynamic import feature, but I’ve noticed that in order for it to work, there is a mapping added to the start of
app.js that defines all of the possible dynamic imports, therefore causing bloat to the file. If I want to add (potentially) hundreds of themes, I can image this mapping bloating the
app.js file quite a bit.
Does anyone have a better solution? I’ve been poking around
standard-minifier-js but so far haven’t found an easy way to bake multiple bundles.