vue-meteor
vue-meteor copied to clipboard
Adding styles from <style> to global Meteor CSS file
It seems that style from .vue files inside <style> tags are added inline inside <style> to DOM. I would prefer that they are added to the global Meteor CSS file so that they are simply loaded once and this is it. If I want scoped CSS to the component I will use that, but I do not see much use of dynamically loaded CSS.
This is sort of a regression made to support code-splitting. If you know a way to add style to the standard style workflow while still marking the js as lazy, let us know! :smile:
[Edit] Or maybe there is a way to detect if the module will be included in the initial bundle or not.
cc @benjamn, maybe he can help?
Any progress on this?
I opened: https://github.com/meteor/meteor-feature-requests/issues/218
It seems that even CSS included from standard modules get added to <style>.
So in my case, I understand that for lazy loading there is not much you can do. But I observe this even for vue files outside of imports, which are bundled. So why is CSS for those files not bundled as well? That should be pretty easy to detect, no? So no need for static analysis, but simply, if it is outside imports, bundle CSS.