File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -84,15 +84,8 @@ export async function startMockAPI() {
8484 // pass through to the server
8585 onUnhandledRequest ( req ) {
8686 const path = new URL ( req . url ) . pathname
87- // Files that get pulled in dynamic imports. It is expected that MSW will
88- // not handle them and they fall through to the dev server, so warning
89- // about them is just noise.
90- const ignore = [
91- path . startsWith ( '/app' ) ,
92- path . startsWith ( '/libs' ) ,
93- path . startsWith ( '/node_modules' ) ,
94- ] . some ( Boolean )
95- if ( ! ignore ) {
87+ // only warn on unhandled requests that are actually to API paths
88+ if ( path . startsWith ( '/v1/' ) ) {
9689 // message format copied from MSW source
9790 console . warn ( `[MSW] Warning: captured an API request without a matching request handler:
9891
You can’t perform that action at this time.
0 commit comments