init
This commit is contained in:
35
vite.config.ts
Normal file
35
vite.config.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import {fileURLToPath, URL} from 'node:url'
|
||||
|
||||
import {defineConfig} from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx'
|
||||
|
||||
//
|
||||
// const {createProxyMiddleware} = require('http-proxy-middleware');
|
||||
// app.use('/api', createProxyMiddleware({
|
||||
// target: '/https:/v3pz.itndedu.com/v3pz/',
|
||||
// changeOrigin: true,
|
||||
// pathRewrite: {'^/api': ''}
|
||||
// }));
|
||||
//
|
||||
// // https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
vueJsx(),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
}
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'https://v3pz.itndedu.com/v3pz/',
|
||||
changeOrigin: true,
|
||||
rewrite: (path): any => path.replace("/api", ''),
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user