Skip to content

Commit

Permalink
use relative path for service worker url
Browse files Browse the repository at this point in the history
  • Loading branch information
yyanwang committed Dec 4, 2024
1 parent f17379c commit e81ad78
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ import { initI18n } from './i18n';
const { i18n: userI18n, cmf, ...userPreview } = <% if(userFilePath) { %> require(String.raw`<%= userFilePath %>`); <% } else { %> {}; <% } %>

// msw
initialize({ onUnhandledRequest: 'bypass' });
initialize({
onUnhandledRequest: 'bypass',
serviceWorker: {
url: './mockServiceWorker.js'
}
});

// i18next
const i18n = initI18n(userI18n);
Expand Down

0 comments on commit e81ad78

Please sign in to comment.