import { defineConfig } from 'vite' import { createVuePlugin } from 'vite-plugin-vue2' import { resolve } from 'path' // https://vitejs.dev/config/ export default defineConfig(({ command }) => { const config = { plugins: [ createVuePlugin({ jsx: true, }), ], resolve: { alias: { '@': resolve(__dirname, 'src'), '@c': resolve(__dirname, 'src/components'), }, }, css:{ } } if (command === 'build') { config.base = '' }else{ config.base = '/' } return config })