How can I load CSS styles from an external URL?
For instance, my domain is domain.eu but my site is located at sub.domain.eu. I want to use styles that are stored on the main domain (common for all sites).
The example below does not work:
"styles": [
"styles.css",
"http://domain.eu/themes/css/common.css"
],
The issue is that webpack tries to bundle these styles and cannot retrieve them. When I import them via CSS like this:
@import('url');
It will not break, but will have problems with missing assets such as images or fonts.
The only solution seems to be adding the external CSS style into index.html. Is it possible to set this value dynamically?
If we have three different themes defining basic fonts and header styles, and we want to change them based on a route or select option element inside a component, is there some sort of hack or workaround to achieve this?