mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-16 11:05:32 +00:00
48 lines
1022 B
JavaScript
48 lines
1022 B
JavaScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import Components from 'unplugin-vue-components/vite'
|
|
|
|
export default defineConfig({
|
|
base: '/picocrank/',
|
|
build: {
|
|
outDir: 'dist',
|
|
rollupOptions: {
|
|
external: [],
|
|
output: {
|
|
assetFileNames: (assetInfo) => {
|
|
if (assetInfo.name === 'style.css') {
|
|
return 'assets/femtocrank-[hash].css'
|
|
}
|
|
if (assetInfo.name === 'dark.css') {
|
|
return 'assets/femtocrank-dark-[hash].css'
|
|
}
|
|
return 'assets/[name]-[hash].[ext]'
|
|
}
|
|
}
|
|
}
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
},
|
|
'/lang': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
}
|
|
},
|
|
},
|
|
plugins: [
|
|
Components({
|
|
dirs: "./vue/",
|
|
extensions: ['vue'],
|
|
deep: true,
|
|
dts: false,
|
|
}),
|
|
vue(),
|
|
],
|
|
})
|