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

transformer-compile-class does not set style tags #1256

Closed
dongivan opened this issue Jul 14, 2022 · 1 comment
Closed

transformer-compile-class does not set style tags #1256

dongivan opened this issue Jul 14, 2022 · 1 comment

Comments

@dongivan
Copy link

I've made an online demo: (https://stackblitz.com/edit/vitejs-vite-2nwcrt)

The class :uno: w-12 h-12 bg-green-400 has been converted to uno-4mhzca, however there is no class with the name uno-4mhzca in the style tags.

package.json:

{
  "name": "vite-starter",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  },
  "dependencies": {
    "vue": "^3.2.25"
  },
  "devDependencies": {
    "@vitejs/plugin-vue": "^2.3.3",
    "@vue/runtime-dom": "^3.2.37",
    "typescript": "^4.5.4",
    "unocss": "^0.44.1",
    "vite": "^2.9.9",
    "vue-tsc": "^0.34.7"
  }
}
@antfu antfu closed this as completed in e991ba4 Jul 14, 2022
@dongivan
Copy link
Author

dongivan commented Jul 14, 2022

Thank you for fixing it!
However in v0.44.2 the HMR does not work while changing :uno: w-12 h-12 bg-green-400 to :uno: w-12 h-12 bg-yellow-400: the latter has been converted(by HMR) to a class with prefix uno- but the uno- class does not be inserted to the style tags still.

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

1 participant