38 lines
885 B
JavaScript
38 lines
885 B
JavaScript
|
|
import { defineConfig } from 'vite'
|
||
|
|
import { svelte } from '@sveltejs/vite-plugin-svelte'
|
||
|
|
import path from 'path'
|
||
|
|
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [svelte()],
|
||
|
|
resolve: {
|
||
|
|
alias: {
|
||
|
|
'@components': path.resolve(__dirname, 'src/components'),
|
||
|
|
'@views': path.resolve(__dirname, 'src/views'),
|
||
|
|
'@stores': path.resolve(__dirname, 'src/stores'),
|
||
|
|
'@lib': path.resolve(__dirname, 'src/lib')
|
||
|
|
}
|
||
|
|
},
|
||
|
|
server: {
|
||
|
|
port: 5173,
|
||
|
|
proxy: {
|
||
|
|
'^(?!/@vite|/@fs|/node_modules|/src).*': {
|
||
|
|
target: 'http://localhost:8000',
|
||
|
|
changeOrigin: true
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
build: {
|
||
|
|
outDir: 'assets/dist',
|
||
|
|
emptyOutDir: true,
|
||
|
|
manifest: false,
|
||
|
|
rollupOptions: {
|
||
|
|
input: 'src/main.js',
|
||
|
|
output: {
|
||
|
|
entryFileNames: 'index.js',
|
||
|
|
chunkFileNames: '[name].js',
|
||
|
|
assetFileNames: '[name].[ext]'
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
})
|