wip: new cssVars SSR integration + fix cssVars SSR injection for suspense
This commit is contained in:
12
packages/compiler-sfc/src/warn.ts
Normal file
12
packages/compiler-sfc/src/warn.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
const hasWarned: Record<string, boolean> = {}
|
||||
|
||||
export function warnOnce(msg: string) {
|
||||
if (!hasWarned[msg]) {
|
||||
hasWarned[msg] = true
|
||||
warn(msg)
|
||||
}
|
||||
}
|
||||
|
||||
export function warn(msg: string) {
|
||||
console.warn(`\x1b[33m[@vue/compiler-sfc] ${msg}\x1b[0m\n`)
|
||||
}
|
||||
Reference in New Issue
Block a user