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

Agnostic (Edge) Runtime support #36

Open
thescientist13 opened this issue May 22, 2022 · 1 comment · Fixed by #105
Open

Agnostic (Edge) Runtime support #36

thescientist13 opened this issue May 22, 2022 · 1 comment · Fixed by #105
Assignees
Labels
feature New feature or request
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented May 22, 2022

Type of Change

  • New Feature Request

Summary

To maximize the potential and viability of wcc across as many runtimes as possible, an effort should be undertaken to ensure support across "standards" based serverless and edge runtime environments. Serverless environments are a little more forgiving, but edge functions typically cannot not use things like Node's fs or CommonJS. However, they do (plan to) standardize on Web APIs like fetch, Request and Response.

Details

Basically need to evaluate and allow wcc to be usable outside of just NodeJS. That will mean validating our dependencies for their module system, and any usage of Node specific APIs like fs. Perhaps this may require a pre-bundle if there is an expectation of ESM only as well, but we will have to see.

I think it would be great to reach

  • Lambda@Edge
  • Netlify Edge Functions
  • Cloudflare Workers
  • Vercel
@thescientist13 thescientist13 added the feature New feature or request label May 22, 2022
@thescientist13 thescientist13 added this to the 1.0 milestone May 22, 2022
@thescientist13 thescientist13 self-assigned this May 22, 2022
@thescientist13 thescientist13 pinned this issue Aug 6, 2022
@thescientist13 thescientist13 changed the title Edge Runtime support Agnostic (Edge) Runtime support Dec 28, 2022
@thescientist13 thescientist13 linked a pull request Jan 4, 2023 that will close this issue
1 task
@thescientist13
Copy link
Member Author

While path and url are easy enough to work around, fs seems like it would be significantly harder without having to employ some sort of "adapter" pattern / feature detection, since it doesn't seem like it is possible to use fetch with a file://, except in Deno.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant