-
-
Notifications
You must be signed in to change notification settings - Fork 250
Use same-origin resources for compiler bundles. #1038
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
Conversation
@cometkim is attempting to deploy a commit to the ReScript Association Team on Vercel. A member of the Team first needs to authorize it. |
8c3553f
to
59021cf
Compare
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.
Then I'd say check them in until Vercel is gone and do the proper action setup later?
Once checked in, it cannot be undone. Therefore, to avoid bloating the git repository, we shouldn't check in forever. |
This will work on Cloudflare pages anyway after changing the command to |
Then we switch to Cloudflare Workers. I'll add GitHub Actions to optimize it and get the versioned snapshot deployments and fork previews we want. |
Ok, I'm merging it; this won't break the existing Vercel build with a few tweaks. |
d3ce49f
to
998b798
Compare
Whoa, option 2 isn't as bad as I expected. Full sync takes only ~20s in the Cloudflare Pages build. |
Compiler JS bundles are uploaded into a Cloudflare R2 bucket.
rescript-lang/rescript#7472
Serving resources from the same-origin removes CORS preflight when visiting the playground and prevents charges for R2 reads.
I made the
sync-bundles
script to download all resources from the bucket.And we have two options:
Option 2 is not feasible for Vercel deployments, but for Cloudflare Pages.
Alternatively, we can run a custom deployment with GitHub Actions (When we use Cloudflare Workers instead of Pages). Option 2 +
@actions/cache
would be the best.