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.
23 lines
613 B
23 lines
613 B
import { defineConfig } from 'vite'
|
|
import uni from '@dcloudio/vite-plugin-uni'
|
|
import { fileURLToPath, URL } from 'node:url'
|
|
import { tiandituDevProxy } from './vite.tianditu-proxy'
|
|
|
|
const createUniPlugin = typeof uni === 'function' ? uni : (uni as any).default
|
|
|
|
export default defineConfig(({ command }) => ({
|
|
plugins: [createUniPlugin()],
|
|
build: {
|
|
outDir: '../szkp-map-service/public/h5',
|
|
emptyOutDir: true,
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
server: {
|
|
proxy: command === 'serve' ? tiandituDevProxy() : undefined,
|
|
},
|
|
}))
|