Skip to content

Commit ca8bdee

Browse files
authored
fix: Fix importCss being imported twice (#16402)
Fixes #16238
1 parent 3fd2745 commit ca8bdee

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎flow-server/src/main/resources/plugins/application-theme-plugin/theme-generator.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,9 @@ function writeThemeFiles(themeFolder, themeName, themeProperties, options) {
184184
}
185185
themeProperties.importCss.forEach((cssPath) => {
186186
const variable = 'module' + i++;
187-
imports.push(`import ${variable} from '${cssPath}';\n`);
188-
globalCssCode.push(`injectGlobalCss(${variable}.toString(), '${CSSIMPORT_COMMENT}', target);\n`);
187+
globalFileContent.push(`import '${cssPath}';\n`);
188+
imports.push(`import ${variable} from '${cssPath}?inline';\n`);
189+
shadowOnlyCss.push(`injectGlobalCss(${variable}.toString(), '${CSSIMPORT_COMMENT}', target);\n`);
189190
});
190191
}
191192

0 commit comments

Comments
 (0)