New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Fix docs using wrong service worker #9030
Conversation
just for testing
Netlify deploy previewNetlify deploy preview: https://deploy-preview-9030--material-ui-x.netlify.app/ Updated pagesNo updates. These are the results for the performance tests:
|
if ( | ||
'serviceWorker' in navigator && | ||
process.env.NODE_ENV === 'production' && | ||
window.location.host.indexOf('mui.com') !== -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reverts commit dc8636b.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ 💯
I'm not sure about my suggestion in hindsight. Does it mean that we will have two service workers trying to serve the https://mui.com/x/* pages? I have tried to dive a bit deeper into how the scope works for service workers, e.g. If our goal is to entirely get rid of the sw.js logic, then maybe should revert this PR, remove the sw logic from this repo as it would become dead code, and apply #8598 in the docs-infra codebase (in https://github.com/mui/material-ui to be clear). I think it's what was proposed in |
@oliviertassinari I decided to try out the no-op service worker on a smaller scale first to ensure it works as expected. I would give it a bit more time to make sure the approach indeed works as expected, and then we can replace the service worker in the core repo as well 👍 |
See mui/material-ui#36808 (comment)