Skip to content

Commit 15c0eb0

Browse files
authoredFeb 11, 2025··
fix(plugin-vue): suppress warnings for non-recognized pseudo selectors form lightningcss (#521)
1 parent 2135c84 commit 15c0eb0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
 

‎packages/plugin-vue/src/index.ts

+14
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,20 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin<Api> {
277277
!config.isProduction
278278
),
279279
}
280+
281+
// #507 suppress warnings for non-recognized pseudo selectors from lightningcss
282+
const _warn = config.logger.warn
283+
config.logger.warn = (...args) => {
284+
const msg = args[0]
285+
if (
286+
msg.match(
287+
/\[lightningcss\] '(deep|slotted|global)' is not recognized as a valid pseudo-/,
288+
)
289+
) {
290+
return
291+
}
292+
_warn(...args)
293+
}
280294
},
281295

282296
configureServer(server) {

0 commit comments

Comments
 (0)
Please sign in to comment.