Skip to content
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

POC: Sandpack Service Worker to Resolve Relative Files #5137

Draft
wants to merge 3 commits into
base: master
from

Conversation

@souldzin
Copy link
Contributor

@souldzin souldzin commented Nov 16, 2020

DO NOTE MERGE!

This PR is just the POC for setting up the Sandpack package to use a Service Worker for resolving relative files. This will be refined and broken into smaller MR's for iteration + ease of review.

Context

Check out the relevant:

Does it work?

Here's the latest integration demo of this working with self-hosted Codesandbox assets and the GitLab Web IDE

cc @CompuIves

@codesandbox
Copy link

@codesandbox codesandbox bot commented Nov 16, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 90cf747:

Sandbox Source
Notifications Test Configuration
@lbogdan lbogdan temporarily deployed to pr5137 Nov 16, 2020 Inactive
@lbogdan
Copy link
Contributor

@lbogdan lbogdan commented Nov 16, 2020

Build for latest commit 90cf747 is at https://pr5137.build.csb.dev/s/new.

@souldzin souldzin marked this pull request as draft Nov 16, 2020
@souldzin souldzin force-pushed the souldzin:ps-sandpack-service-worker-poc branch from 18910fb to 60c647a Nov 19, 2020
@lbogdan lbogdan temporarily deployed to pr5137 Nov 19, 2020 Inactive
- This needs to be built and tagged to prevent the
eager caching of service workers in browsers.
@souldzin souldzin force-pushed the souldzin:ps-sandpack-service-worker-poc branch from 60c647a to 9321ae6 Dec 14, 2020
@lbogdan lbogdan temporarily deployed to pr5137 Dec 14, 2020 Inactive
@lbogdan lbogdan temporarily deployed to pr5137 Dec 17, 2020 Inactive
- Passes request / response info through client/window message API.
- Has the fallback ability to passthrough a request with default
  behavior when client can't resolve it.
@souldzin souldzin force-pushed the souldzin:ps-sandpack-service-worker-poc branch from ead2d35 to c4ccce6 Dec 17, 2020
@lbogdan lbogdan temporarily deployed to pr5137 Dec 17, 2020 Inactive
This is important for the sandpack service worker to have
the right `contentType` in the response.

This is only used by the new sandpack service worker.
@souldzin souldzin force-pushed the souldzin:ps-sandpack-service-worker-poc branch from c4ccce6 to 90cf747 Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants