We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
0.58.6
when I use presetAttributify and transformerAttributifyJsx in my project,it appears an error this is my uno.config.ts
import { defineConfig } from 'unocss/vite' import theme from './src/config/theme' import { transformerAttributifyJsx, transformerDirectives, presetAttributify, presetUno } from 'unocss' import presetIcons from 'unocss/preset-icons' export default defineConfig({ exclude: [ 'node_modules', 'dist', '.git', '.husky', '.vscode', 'public', 'build', 'mock', './stats.html' ], presets: [presetUno({ dark: 'class' }), presetAttributify(), presetIcons()], transformers: [transformerDirectives(), transformerAttributifyJsx()], shortcuts: {}, theme: { colors: { ...theme } } })
this is my vite.config.ts
import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import path from 'path' import Unocss from 'unocss/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [Unocss({}), react()], resolve: { alias: { '@': path.resolve(__dirname, 'src') // src 路径 } } })
this is my react code
const Home = () => { return ( <div> <h1 mt-20>Home</h1> </div> ) } export default Home
I also add shims.d.ts in the root path,but I don't think it can make this error
import type { AttributifyAttributes } from '@unocss/preset-attributify' declare module 'react' { interface HTMLAttributes<T> extends AttributifyAttributes {} }
No response
The text was updated successfully, but these errors were encountered:
plus: when I use classname,unocss works
Sorry, something went wrong.
No branches or pull requests
UnoCSS version
0.58.6
Describe the bug
when I use presetAttributify and transformerAttributifyJsx in my project,it appears an error
this is my uno.config.ts
this is my vite.config.ts
this is my react code
I also add shims.d.ts in the root path,but I don't think it can make this error
Reproduction
System Info
No response
Validations
The text was updated successfully, but these errors were encountered: