Files
faceFamilySource/vite.config.js
2025-09-08 15:36:26 +08:00

50 lines
1023 B
JavaScript

import { fileURLToPath, URL } from 'node:url'
const packageJson = require('./package.json');
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'
// https://vite.dev/config/
export default defineConfig({
// base: 'https://huodong2.lzlj.com/iceSip/',
plugins: [
vue({
template: {
compilerOptions: {
isCustomElement: (tag) => tag.includes('swiper')
}
}
}),
vueDevTools(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
server: {
proxy: {
'/api': {
target: 'https://huodong2.lzlj.com',
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
}
}
},
build: {
assetsInlineLimit: 0,
rollupOptions: {
output: {
manualChunks: {
phaser: ['phaser']
}
}
},
},
define: {
'__APP_VERSION__': JSON.stringify(packageJson.version)
},
})