Skip to content

Commit 01d42bb

Browse files
fix: 🐛 add attributes backwards compatibility
1 parent fb24a6f commit 01d42bb

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/index.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,10 @@ function main(): PreprocessorGroup {
214214
// PREFLIGHTS_STYLE = PREFLIGHTS.build()
215215
// }
216216
let preflightStyleSheet = new StyleSheet()
217-
if (attributes['windi-preflights-global']) {
217+
if (
218+
attributes['windi:preflights:global'] ||
219+
attributes['windi-preflights-global']
220+
) {
218221
preflightStyleSheet = globalStyleSheet(generatorWindi.preflight())
219222
}
220223
const preflightStyles = preflightStyleSheet.build()
@@ -241,7 +244,10 @@ function main(): PreprocessorGroup {
241244
// }
242245
// }
243246
let safelistStyleSheet = new StyleSheet()
244-
if (attributes['windi-safelist-global']) {
247+
if (
248+
attributes['windi:safelist:global'] ||
249+
attributes['windi-safelist-global']
250+
) {
245251
safelistStyleSheet = globalStyleSheet(
246252
generatorWindi.interpret(configuration.safeList || '').styleSheet
247253
)

0 commit comments

Comments
 (0)