mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-12 16:47:26 +02:00
Update how separate css files are identified
This commit is contained in:
parent
fc4e5b05df
commit
b359a2500d
3 changed files with 29 additions and 6 deletions
|
@ -111,6 +111,20 @@ function execute(port) {
|
|||
|
||||
/****************************************************************************/
|
||||
|
||||
function isSeparateCss(file) {
|
||||
if (!siteConfig.separateCss) {
|
||||
return false;
|
||||
}
|
||||
for (let i = 0; i < siteConfig.separateCss.length; i++) {
|
||||
if (file.includes(siteConfig.separateCss[i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
console.log("server.js triggered...");
|
||||
|
||||
reloadMetadataCategories();
|
||||
|
@ -354,7 +368,7 @@ function execute(port) {
|
|||
let files = glob.sync(CWD + "/static/**/*.css");
|
||||
|
||||
files.forEach(file => {
|
||||
if (siteConfig.separateCss.indexOf(path.basename(file)) != -1) {
|
||||
if (isSeparateCss(file)) {
|
||||
return;
|
||||
}
|
||||
cssContent =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue