| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import { mergeConfig } from 'vite';
- import eslint from 'vite-plugin-eslint';
- import baseConfig from './vite.config.base';
- export default mergeConfig(
- {
- mode: 'development',
- publicPath: './',
- server: {
- open: true, // 项目启动后,自动打开
- fs: {
- strict: true,
- },
- proxy: {
- '/basic-api': {
- target: 'http://localhost:3000',
- changeOrigin: true,
- ws: true,
- // rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''),
- // only https
- // secure: false
- },
- '/v1': {
- target: 'http://192.168.20.116:1080/',
- changeOrigin: true,
- ws: true,
- // rewrite: (path) => path.replace(new RegExp(`^/upload`), ''),
- },
- },
- // warmup: {
- // clientFiles: ['./index.html', './src/{views,components}/*'],
- // },
- },
- plugins: [
- eslint({
- cache: false,
- // include: ['src/**/*.ts', 'src/**/*.tsx', 'src/**/*.vue'],
- include: [''],
- exclude: ['node_modules'],
- }),
- ],
- },
- baseConfig
- );
|