Skip to content

Commit

Permalink
config: 去掉 msw 的调用;修改服务启动端口号
Browse files Browse the repository at this point in the history
  • Loading branch information
kangood committed Feb 5, 2024
1 parent d1b8887 commit 6d35078
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 28 deletions.
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

5 changes: 2 additions & 3 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import 'virtual:svg-icons-register';

import App from '@/App';

import { worker } from './_mock';
// i18n
import './locales/i18n';
// tailwind css
Expand Down Expand Up @@ -54,5 +53,5 @@ root.render(
</HelmetProvider>,
);

// 🥵 start service worker mock in development mode
worker.start({ onUnhandledRequest: 'bypass' });
// 不再使用 mock 数据,调用 nest 后端获取
// worker.start({ onUnhandledRequest: 'bypass' });
6 changes: 2 additions & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ export default defineConfig({
}),
],
server: {
// 自动打开浏览器
open: true,
host: true,
port: 3001,
port: 7442,
proxy: {
'/api': {
target: 'http://localhost:3000',
target: 'http://127.0.0.1:7441',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
},
Expand Down

0 comments on commit 6d35078

Please sign in to comment.