1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
| import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' import vueDevTools from 'vite-plugin-vue-devtools' import AutoImport from 'unplugin-auto-import/vite' import Components from 'unplugin-vue-components/vite' import { VantResolver } from '@vant/auto-import-resolver' import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers' import GetLoginTemplate from './src/utils/GetLoginTemplate' import { AntDesignIconResolver,AntDesignApiResolver } from './src/utils/AntDesignResolver'
export default defineConfig({ server: { host: '', proxy: { '/api': 'http://localhost:4000' } }, plugins: [ vue(), vueJsx(), vueDevTools(), AutoImport({ dirs: ['@/utils/Composable/**'], eslintrc: { enabled: true, filepath: '.eslintrc-auto-import.json', globalsPropValue: true }, imports: ['vue', 'vue-router', 'pinia'], include: [/\.[tj]sx?$/, /\.vue$/, /\.vue\?vue/, /\.md$/], dts: 'auto-imports.d.ts', resolvers: [ VantResolver(), AntDesignVueResolver({ importStyle: 'less' }), AntDesignApiResolver() ] }), Components({ dirs: ['./src/components/**', './src/utils/Composable/**', './src/Layout/**'], extensions: ['vue'], exclude: [/node_modules/, /\.git/, /\.nuxt/, /dist/, /public/, /test/, /mocks/], include: [/\.vue$/, /\.vue\?vue/, /\.md$/, /\.ts$/, /\.js$/, /\.jsx$/, /\.tsx$/], deep: true, dts: 'components.d.ts', resolvers: [ VantResolver(), AntDesignVueResolver({ importStyle: 'less' }), AntDesignIconResolver() ] }) ], resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) } }, css: { preprocessorOptions: { scss: { additionalData: '@import "@/assets/variables.scss";' } } } })
|