31 lines
649 B
JavaScript
31 lines
649 B
JavaScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import path from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src')
|
|
}
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
},
|
|
build: {
|
|
assetsDir: 'static/assets',
|
|
rollupOptions: {
|
|
output: {
|
|
entryFileNames: `static/assets/[name]-[hash].js`,
|
|
chunkFileNames: `static/assets/[name]-[hash].js`,
|
|
assetFileNames: `static/assets/[name]-[hash].[ext]`
|
|
}
|
|
}
|
|
}
|
|
}) |