Investigate using Service Workers for Clientside Live Preview
Description
After an interesting conversation with the Codesandbox team, we were presented with a possible solution to #197206 (closed):
- Use service workers as a "proxy" to these static assets.
This would be really nice because we can avoid the infrastructure requirements since it will all be client side. There are some interesting challenges though:
- The service worker needs to be loaded in a separate unauthenticated domain. How can it make requests to file data then?
- What happens when someone has two IDE's open? Do service workers effect the entire browser session or just that tab? Is there a way we can scope the worker to the specific ide session?
Diagram
Links
- (INTERNAL ONLY) Discussion doc: https://docs.google.com/document/d/1-6SCcux21PIvU5oIvNaZg2ddep0n9W8k0LEYT0pzrVE/edit
Edited by Kai Armstrong
