You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.3 KiB
61 lines
1.3 KiB
/**
|
|
* Vite Configuration
|
|
*
|
|
* Build tool configuration for the World Component project.
|
|
* Provides development server, build optimization, and path aliases.
|
|
*
|
|
* @file vite.config.ts
|
|
* @author Matthew Raymer
|
|
* @created 2023-06-28
|
|
* @version 1.0.0
|
|
*/
|
|
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { resolve } from 'path'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
|
|
// Path aliases for cleaner imports
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src'),
|
|
'@/components': resolve(__dirname, 'src/components'),
|
|
'@/systems': resolve(__dirname, 'src/systems'),
|
|
'@/types': resolve(__dirname, 'src/types'),
|
|
'@/assets': resolve(__dirname, 'src/assets')
|
|
}
|
|
},
|
|
|
|
// Build configuration
|
|
build: {
|
|
target: 'es2020',
|
|
outDir: 'dist',
|
|
assetsDir: 'assets',
|
|
sourcemap: true,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
'three': ['three'],
|
|
'vue': ['vue'],
|
|
'vendor': ['axios', 'ramda']
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
// Development server configuration
|
|
server: {
|
|
port: 3000,
|
|
open: true,
|
|
host: true
|
|
},
|
|
|
|
// Preview server configuration
|
|
preview: {
|
|
port: 4173,
|
|
open: true
|
|
}
|
|
})
|
|
|