running0503 7757d96f34
update vite/plugins/unocss.ts.
因低浏览器不支持 top-level await,会报 __uno.css:9 Uncaught SyntaxError: Unexpected reserved word

hmrTopLevelAwait
unocss默认是true,低版本浏览器是不支持启动后会报错

Signed-off-by: running0503 <xiangdeshan_120@sina.com>
2023-05-31 07:27:16 +00:00

15 lines
555 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import UnoCss from 'unocss/vite';
import { presetUno, presetAttributify, presetIcons } from 'unocss';
export default () => {
return UnoCss({
presets: [presetUno(), presetAttributify(), presetIcons()],
// rules: [['search', {}]],
shortcuts: {
'panel-title':
'pb-[5px] font-sans leading-[1.1] font-medium text-base text-[#6379bb] border-b border-b-solid border-[var(--el-border-color-light)] mb-5 mt-0'
},
hmrTopLevelAwait: false, // unocss默认是true低版本浏览器是不支持的启动后会报错
});
};