25 lines
643 B
TypeScript
25 lines
643 B
TypeScript
import { fileURLToPath, URL } from 'node:url'
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
export default defineConfig({
|
|
base: './',
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) },
|
|
},
|
|
build: {
|
|
outDir: '../ui-build',
|
|
emptyOutDir: true,
|
|
cssCodeSplit: false,
|
|
assetsInlineLimit: 1024 * 1024 * 8,
|
|
rollupOptions: {
|
|
output: {
|
|
entryFileNames: 'app.js',
|
|
chunkFileNames: 'chunk-[name].js',
|
|
assetFileNames: (asset) => asset.name?.endsWith('.css') ? 'styles.css' : 'assets/[name][extname]',
|
|
},
|
|
},
|
|
},
|
|
})
|