Karsa 2 жил өмнө
parent
commit
18d06124c7
2 өөрчлөгдсөн 11 нэмэгдсэн , 10 устгасан
  1. 1 0
      src/main.js
  2. 10 10
      vite.config.js

+ 1 - 0
src/main.js

@@ -5,5 +5,6 @@ import store from './store'
 import 'normalize.css'
 import './style/common.scss'
 import '@vant/touch-emulator';//vant 
+import 'vant/lib/index.css'
 
 createApp(App).use(router).use(store).mount('#app')

+ 10 - 10
vite.config.js

@@ -1,21 +1,21 @@
 import { defineConfig,loadEnv } from 'vite'
 import vue from '@vitejs/plugin-vue'
-import styleImport from 'vite-plugin-style-import';
+// import styleImport from 'vite-plugin-style-import';
 import path from "path";
 // https://vitejs.dev/config/
 export default ({mode})=>defineConfig({
   base:loadEnv(mode, process.cwd()).VITE_APP_BASE_URL,
   plugins: [
     vue(),
-    styleImport({
-      libs: [
-        {
-          libraryName: 'vant',
-          esModule: true,
-          resolveStyle: (name) => `vant/es/${name}/style/index`,
-        },
-      ],
-    }),
+    // styleImport({
+    //   libs: [
+    //     {
+    //       libraryName: 'vant',
+    //       esModule: true,
+    //       resolveStyle: (name) => `vant/es/${name}/style/index`,
+    //     },
+    //   ],
+    // }),
   ],
   resolve: {
     alias: {