| 1234567891011121314151617181920212223242526 |
- import {
- defineConfig
- } from 'vite'
- import uni from '@dcloudio/vite-plugin-uni'
- import path from 'path'
- export default defineConfig({
- plugins: [uni()],
- resolve: {
- alias: {
- '@': path.resolve(__dirname, 'src'),
- },
- extensions: ['.uts', '.ts', '.js', '.json', '.vue', '.uvue']
- },
- server: {
- port: 8080,
- proxy: {
- '/api': {
- target: 'http://192.168.0.9:8001/api',
- changeOrigin: true,
- secure: false,
- rewrite: (path) => path.replace(/^\/api/, '')
- }
- }
- }
- })
|