27 lines
635 B
TypeScript
27 lines
635 B
TypeScript
import { fileURLToPath, URL } from 'node:url';
|
|
import { defineConfig } from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
|
|
const entry = fileURLToPath(new URL('./static/src/main.ts', import.meta.url));
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
build: {
|
|
outDir: 'static/dist',
|
|
emptyOutDir: false,
|
|
rollupOptions: {
|
|
input: entry,
|
|
output: {
|
|
entryFileNames: 'assets/[name].js',
|
|
chunkFileNames: 'assets/[name].js',
|
|
assetFileNames: 'assets/[name][extname]'
|
|
}
|
|
}
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./static/src', import.meta.url))
|
|
}
|
|
}
|
|
});
|