Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@unocss/runtime does not work #3757

Closed
4 tasks done
coderlzw-cn opened this issue Apr 26, 2024 · 2 comments
Closed
4 tasks done

@unocss/runtime does not work #3757

coderlzw-cn opened this issue Apr 26, 2024 · 2 comments

Comments

@coderlzw-cn
Copy link

UnoCSS version

0.58.6

Describe the bug

image Does this thing need any more configuration

Reproduction

https://stackblitz.com/edit/vitejs-vite-bd9mbx?file=uno.config.ts

System Info

No response

Validations

@zyyv
Copy link
Member

zyyv commented May 8, 2024

https://stackblitz.com/edit/vitejs-vite-bd9mbx?file=uno.config.ts

Refer to https://unocss.dev/integrations/runtime#usage, your uno runtime config is empty, so it doesn't work.

image

I see your demo are using dynamic class, put them in safelist will be work.

{
  safelist: ['text-zinc-200', 'text-zinc-500']
}

@zyyv zyyv closed this as completed May 8, 2024
@zyyv
Copy link
Member

zyyv commented May 8, 2024

I don't recommend you to use runtime in vite env, they have different context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants