You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
962 B
37 lines
962 B
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import Components from 'unplugin-vue-components/vite';
|
|
import { VantResolver } from 'unplugin-vue-components/resolvers';
|
|
import {resolve} from 'path'
|
|
import alias from '@rollup/plugin-alias'
|
|
import topLevelAwait from "vite-plugin-top-level-await";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
base: '/m/',
|
|
plugins: [
|
|
alias(),
|
|
vue(),
|
|
Components({
|
|
resolvers: [VantResolver()],
|
|
}),
|
|
topLevelAwait({
|
|
// The export name of top-level await promise for each chunk module
|
|
promiseExportName: "__tla",
|
|
// The function to generate import names of top-level await promise in each chunk module
|
|
promiseImportName: i => `__tla_${i}`
|
|
})
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@' : resolve(__dirname,'src')
|
|
}
|
|
},
|
|
css: {
|
|
|
|
},
|
|
build: {
|
|
outDir: ['slash'].includes(vite.meta.env.VITE_APP_ENV)?'../build/m':'./dist'
|
|
}
|
|
})
|