mirror of
https://github.com/cuigh/swirl
synced 2024-12-30 15:53:24 +00:00
37 lines
801 B
TypeScript
37 lines
801 B
TypeScript
|
import { defineConfig } from 'vite'
|
||
|
import vue from '@vitejs/plugin-vue'
|
||
|
import path from 'path'
|
||
|
|
||
|
// https://vitejs.dev/config/
|
||
|
export default defineConfig({
|
||
|
plugins: [vue()],
|
||
|
resolve: {
|
||
|
alias: {
|
||
|
vue: "vue/dist/vue.esm-bundler.js",
|
||
|
'vue-i18n': "vue-i18n/dist/vue-i18n.cjs.js",
|
||
|
'@': path.resolve(__dirname, './src'),
|
||
|
}
|
||
|
},
|
||
|
build: {
|
||
|
cssCodeSplit: false,
|
||
|
// rollupOptions: {
|
||
|
// output: {
|
||
|
// manualChunks(id) {
|
||
|
// if (id.includes('node_modules')) {
|
||
|
// return id.toString().split('node_modules/')[1].split('/')[0].toString();
|
||
|
// }
|
||
|
// }
|
||
|
// }
|
||
|
// },
|
||
|
},
|
||
|
server: {
|
||
|
port: 3002,
|
||
|
proxy: {
|
||
|
'/api': {
|
||
|
target: 'http://localhost:8002',
|
||
|
changeOrigin: true,
|
||
|
},
|
||
|
}
|
||
|
},
|
||
|
})
|