Dynamically load css files based on domain name

there are multiple platforms under a vue project. The style of which platform is loaded is determined according to the domain name accessed by the customer, and most of the js, are universal, so we can only extract the uncommon ones into separate files, such as a.css and b.css. We intend to dynamically load a file and import it in the form of variables on the page, but how to achieve dynamic loading and what kind of directory structure is better

Nov.15,2021

you can use js to dynamically generate script and link tags in index.html


create a webpack configuration file for each platform with webpack, and each file sets configuration items according to requirements. When deploying, use the corresponding webpack configuration file according to the platform. (the condition is that each platform corresponds to a separate server. )

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a6d9-2c22c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a6d9-2c22c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?