| 12345678910111213141516171819202122232425 |
- 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: {
- proxy: {
- '/dev': {
- target: 'https://dev.xiaodingyun.cn',
- changeOrigin: true,
- rewrite: (path) => {
- console.log('代理路径:', path)
- return path.replace(/^\/dev/, '')
- }
- }
- }
- }
- })
|