Просмотр исходного кода

Revert "!17 feat: unocss 更新unocss版本及配置,解决unocss 虚拟配置重复引用问题"

This reverts commit bf5439d32a3873e3c288e65ffd6ce90d866b469e, reversing
changes made to 6f3d99402cfbad14db255bebaa02fcf9eab1f319.
feige996 8 месяцев назад
Родитель
Сommit
13e976ef88
6 измененных файлов с 205 добавлено и 219 удалено
  1. 1 1
      package.json
  2. 201 196
      pnpm-lock.yaml
  3. 2 3
      src/main.ts
  4. 1 1
      src/pages.json
  5. 0 1
      src/style/uno.scss
  6. 0 17
      uno.config.ts

+ 1 - 1
package.json

@@ -145,7 +145,7 @@
     "rollup-plugin-visualizer": "^5.12.0",
     "sass": "1.77.8",
     "typescript": "^5.7.2",
-    "unocss": "66.4.2",
+    "unocss": "66.0.0",
     "unplugin-auto-import": "^0.17.8",
     "vite": "5.2.8",
     "vite-plugin-restart": "^0.4.2",

Разница между файлами не показана из-за своего большого размера
+ 201 - 196
pnpm-lock.yaml


+ 2 - 3
src/main.ts

@@ -6,9 +6,8 @@ import { routeInterceptor } from './router/interceptor'
 
 import store from './store'
 import '@/style/index.scss'
-// import 'virtual:uno.css'
-import '@/style/uno.scss'
-// 替换 virtual:uno.css
+import 'virtual:uno.css'
+
 export function createApp() {
   const app = createSSRApp(App)
   app.use(store)

+ 1 - 1
src/pages.json

@@ -89,4 +89,4 @@
       ]
     }
   ]
-}
+}

+ 0 - 1
src/style/uno.scss

@@ -1 +0,0 @@
-@unocss;

+ 0 - 17
uno.config.ts

@@ -9,23 +9,6 @@ import {
 } from 'unocss'
 
 export default defineConfig({
-  // 添加此配置避免重复扫描
-  content: {
-    pipeline: {
-      exclude: [
-        'node_modules',
-        '.git',
-        'dist',
-        '**/*.d.ts',
-        '__uno.css', // 🚨 排除警告中的问题文件
-      ],
-    },
-  },
-  // 添加此配置
-  include: [
-    './src/**/*.{vue,js,ts,jsx,tsx}',
-    './src/style/uno.scss', // 指定新入口
-  ],
   presets: [
     presetUni({
       attributify: {