|
@@ -22,8 +22,9 @@ if (process.env.NODE_ENV === 'development' && process.env.USE_MSW === 'true') {
|
|
|
import('../mocks/server')
|
|
|
.then(({ server }) => {
|
|
|
server.start({
|
|
|
- onUnhandledRequest: 'bypass', // Ignore unhandled requests
|
|
|
+ onUnhandledRequest: 'error', // 未处理的请求触发网络错误
|
|
|
});
|
|
|
+ console.log(`启动了MSW`);
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
console.warn('Mock server module not found:', err);
|