| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import { defineConfig } from 'vite'
- import vue from '@vitejs/plugin-vue'
- import { resolve } from 'path'
- import topLevelAwait from 'vite-plugin-top-level-await'
- import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
- // https://vitejs.dev/config/
- export default defineConfig({
- plugins: [
- vue(),
- topLevelAwait({
- promiseExportName: '__tla',
- promiseImportName: i => `__tla_${i}`
- }),
- createSvgIconsPlugin({
- iconDirs: [resolve(process.cwd(), 'src/assets/svg')],
- })
- ],
- resolve: {
- alias: {
- '@': resolve(__dirname, './src/'),
- }
- },
- css: {
- preprocessorOptions: {
- scss: {
- additionalData: ` @use './src/assets/style/bem.scss' as *;`
- }
- },
- },
- server: {
- hmr: true,
- port: 9074,
- open: true,
- proxy: {
- "/appServer": {
- target: "http://127.0.0.1:9075",
- changeOrigin: true,
- },
- }
- },
- })
|