elnafo/crates/frontend/vite.config.ts

32 lines
693 B
TypeScript

import { fileURLToPath, URL } from 'node:url'
import { resolve } from 'path'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
// TODO:move index.html to src
// https://vitejs.dev/config/
export default defineConfig({
//base: '/',
plugins: [
vue(),
vueJsx(),
],
//root: './src',
build: {
rollupOptions: {
output: {
entryFileNames: 'assets/[name].js',
assetFileNames: 'assets/[name].css'
}
}
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
}
})