You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import {createHotContext as __vite__createHotContext} from "/_nuxt/@vite/client";
import.meta.hot = __vite__createHotContext("/__uno.css");
import {updateStyle as __vite__updateStyle, removeStyle as __vite__removeStyle} from "/_nuxt/@vite/client"
const __vite__id = "/__uno.css"
const __vite__css = "..."
__vite__updateStyle(__vite__id, __vite__css)
import.meta.hot.accept()
import.meta.hot.prune(()=>__vite__removeStyle(__vite__id))
if (import.meta.hot) {
try {
let hash = __vite__css.match(/__uno_hash_(\w{6})/)
hash = hash && hash[1]
if (!hash)
console.warn('[unocss-hmr]', 'failed to get unocss hash, hmr might not work')
else
await import.meta.hot.send('unocss:hmr', ['__ALL__']);
} catch (e) {
console.warn('[unocss-hmr]', e)
}
if (!import.meta.url.includes('?'))
await new Promise(resolve=>setTimeout(resolve, 100))
}
document.querySelectorAll(`link[href="/_nuxt/__uno.css"]`).forEach(i=>i.remove())
document.querySelectorAll(`link[href="/_nuxt/@fs/__uno.css"]`).forEach(i=>i.remove())
Reproduction
I tried recreating a minimal example but couldn't.
Essentially what my transformer is doing is looking for tokens and replacing them with that token prefixed with a variant group.
e.g. Changing all uses of text-red to lg:text-red.
tokens.delete("text-red") is causing the issue. If I don't remove the token, everything works fine but extra CSS is generated.
We temporarily closed this due to the lack of enough information. We could not identify whether it was a bug or a userland misconfiguration with the given info.
Please provide a minimal reproduction to reopen the issue.
Thanks.
UnoCSS version
0.58.5
Describe the bug
Calling
tokens.delete(token)
within a transformer results in an endless loop of errors and network requests forindex.vue
and__uno.css
.Contents of those two files:
Reproduction
I tried recreating a minimal example but couldn't.
Essentially what my transformer is doing is looking for tokens and replacing them with that token prefixed with a variant group.
e.g. Changing all uses of
text-red
tolg:text-red
.tokens.delete("text-red")
is causing the issue. If I don't remove the token, everything works fine but extra CSS is generated.System Info
Nuxt: 3.10.3
Validations
The text was updated successfully, but these errors were encountered: