Skip to content

Commit

Permalink
Do not warn for static assets
Browse files Browse the repository at this point in the history
  • Loading branch information
IanVS committed Nov 9, 2023
1 parent 4ab8e8c commit a1acb24
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/msw-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,13 @@ export default class MswConfig {
}
// @ts-expect-error this seems to be an issue in msw types
req.passthrough();
} else if (this.mirageServer?.shouldLog()) {
}

// Log a warning for any requests for resources that aren't static assets of the page itself
else if (
req.url.host !== window.location.host &&
this.mirageServer?.shouldLog()
) {
let namespaceError = '';
if (this.namespace === '') {
namespaceError = 'There is no existing namespace defined.';
Expand Down

0 comments on commit a1acb24

Please sign in to comment.