41 lines
No EOL
1 KiB
TypeScript
41 lines
No EOL
1 KiB
TypeScript
import { defineConfig } from 'vite';
|
|
import * as path from 'path';
|
|
import vue from '@vitejs/plugin-vue';
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
root: '.',
|
|
publicDir: 'public/dist',
|
|
build: {
|
|
outDir: 'public/dist',
|
|
emptyOutDir: true,
|
|
rollupOptions: {
|
|
input: {
|
|
app: path.resolve('resources/scripts/main.ts'),
|
|
},
|
|
output: {
|
|
entryFileNames: 'scripts/[name].js',
|
|
chunkFileNames: 'scripts/[name].js',
|
|
assetFileNames: '[ext]/[name].[ext]',
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@styles': path.resolve('resources/styles'),
|
|
'@scripts': path.resolve('resources/scripts')
|
|
},
|
|
},
|
|
css: {
|
|
postcss: './postcss.config.cjs'
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/': {
|
|
target: 'http://bit.test',
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/$/, ''),
|
|
},
|
|
},
|
|
},
|
|
}); |