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

import text file types into bundles #107

Merged
merged 2 commits into from
Dec 14, 2021
Merged

import text file types into bundles #107

merged 2 commits into from
Dec 14, 2021

Conversation

threepointone
Copy link
Contributor

This is the first of what I think will be a few PRs for supporting non-js modules in workers. When esbuild scans the module graph, we collect references to some well known file types, mark them as external, and instead add them directly to the worker form upload. This prevents the need to configure this in wrangler.toml or whatever.

In the next PR, I'll do .wasm support in a similar vein.

Once we have that in place, I'll probably work on a --loader flag to define custom types.

This is the first of what I think will be a few PRs for supporting non-js modules in workers. When esbuild scans the module graph, we collect references to some well known file types, mark them as external, and instead add them directly to the worker form upload. This prevents the need to configure this in wrangler.toml or whatever.

In the next PR, I'll do wasm support in a similar vein.

Once we have that in place, I'll probably work on a `--loader` flag to define custom types.
@changeset-bot
Copy link

changeset-bot bot commented Dec 14, 2021

🦋 Changeset detected

Latest commit: 5c25b22

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@threepointone threepointone merged commit cd05d20 into main Dec 14, 2021
@threepointone threepointone deleted the module-collection branch December 14, 2021 20:08
threepointone added a commit that referenced this pull request Dec 14, 2021
Following up from #107, this PR adds support for importing `.wasm` files. Specifically, it works directly on the output of [`workers-rs`](https://github.com/cloudflare/workers-rs). I'll test with other wasm outputs (like assemblyscript etc) later.
threepointone added a commit that referenced this pull request Dec 14, 2021
Following up from #107, this PR adds support for importing `.wasm` files. Specifically, it works directly on the output of [`workers-rs`](https://github.com/cloudflare/workers-rs). I'll test with other wasm outputs (like assemblyscript etc) later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant