Closed jankapunkt closed 4 years ago
Instead of dynamic imports, why shouldn't we just move them outside the package? We can package them separately.
If this wouldn't cause any follow-up issues I would be fine with it. Then there is still the question, whether the default unstyled templates should remain and if so, should they be imported dynamically, becauses chances are high they get overridden by a styled template from a another package.
Yeah, I wanted to move these out of the main package for several reasons. First of all I'm not using them, a lot of people don't, BS3 is deprecated, it's making the code huge and difficult to maintain. If we make them separate packages and there are people who are using them then they can contribute to these packages.
IMO it's best to keep things separated, maybe it made sense to put all of these in the same package when aldeed was making autoform, there wasn't any third party templates at first, but now that we have a lot of third party templates it makes sense to move these templates out of the main package.
Makes sense, also the MaterialUI people would be happy, too. What priority would you give this?
I can start working on this after I remove the underscore dependency.
Closing this. If this causes issues we'll make new thread for it.
Since BS3 is highly deprecated (and has several security issues in older versions) there is already some BS4 support out there via
imajus:autoform-bootstrap4
.Now I don't need any of the older BS3 templates but they are always loaded into the client, eating up some KB of initial package size.
I propose to load them dynamically using dynamic imports. A proof-of-concept solution, where explicit static import can be forced via environment variables can be copied from here: https://github.com/jankapunkt/meteor-blaze-bs4/blob/master/blaze-bs4/package.js