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

使用unipp vue3版本使用windi css配置别名不生效 #4856

Open
chenlang6 opened this issue Apr 22, 2024 · 0 comments
Open

使用unipp vue3版本使用windi css配置别名不生效 #4856

chenlang6 opened this issue Apr 22, 2024 · 0 comments

Comments

@chenlang6
Copy link

chenlang6 commented Apr 22, 2024

下面是vite.config.js代码

import WindiCSS from 'vite-plugin-windicss'
import {
	defineConfig
} from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
export default defineConfig({
	plugins: [
		WindiCSS({
			scan: {
				dirs: ['.'], // 当前目录下所有文件
				fileExtensions: ['vue', 'js', 'ts'], // 同时启用扫描vue/js/ts
			},
			alias: {
				'hstack': 'flex items-center',
				'vstack': 'flex flex-col',
				'icon': 'w-6 h-6 fill-current',
				'app': 'text-red',
				'app-border': 'border-gray-200 dark:border-dark-300',
			}
		}),
		uni(),
	],
})

我是这样使用的<image class="*icon" src="/static/logo.png"></image>它并没有达到效果

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