-
Notifications
You must be signed in to change notification settings - Fork 760
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
feat: implement [build.upload.rules]
for both service-worker/modules format workers
#416
Comments
Most of this was done in #530, but some followups before we can close this
|
I proposed a partial fix for this in cloudflare/miniflare#205 |
This rewrites how we pass configuration to miniflare in `wrangler dev`'s local mode. Instead of passing the entire configuration as cli args, we now generate a `wrangler.toml` based on our generated/inferred configuration, and pass that to miniflare instead. This solves a couple of issues, notably - - `text_blobs` now works in local mode+service-worker format - `Text` modules now work in local mode+service-worker format - We properly throw errors for `Data` module in service-worker format Along with cloudflare/miniflare#205, this fixes #416.
This rewrites how we pass configuration to miniflare in `wrangler dev`'s local mode. Instead of passing the entire configuration as cli args, we now generate a `wrangler.toml` based on our generated/inferred configuration, and pass that to miniflare instead. This solves a couple of issues, notably - - `text_blobs` now works in local mode+service-worker format - `Text` modules now work in local mode+service-worker format - We properly throw errors for `Data` module in service-worker format Along with cloudflare/miniflare#205, this fixes #416.
This rewrites how we pass configuration to miniflare in `wrangler dev`'s local mode. Instead of passing the entire configuration as cli args, we now generate a `wrangler.toml` based on our generated/inferred configuration, and pass that to miniflare instead. This solves a couple of issues, notably - - `text_blobs` now works in local mode+service-worker format - `Text` modules now work in local mode+service-worker format - We properly throw errors for `Data` module in service-worker format Along with cloudflare/miniflare#205, this fixes #416.
for |
Opened cloudflare/miniflare#228 with more hope than tangible code |
This adds support for `text_blobs`/Text module support in local mode. Now that cloudflare/miniflare#228 has landed in miniflare (thanks @caass!), we can use that in wrangler as well. Fixes #416
This adds support for `text_blobs`/Text module support in local mode. Now that cloudflare/miniflare#228 has landed in miniflare (thanks @caass!), we can use that in wrangler as well. Fixes #416
This adds support for `text_blobs`/Text module support in local mode. Now that cloudflare/miniflare#228 has landed in miniflare (thanks @caass!), we can use that in wrangler as well. Fixes #416
This adds support for `text_blobs`/Text module support in local mode. Now that cloudflare/miniflare#228 has landed in miniflare (thanks @caass!), we can use that in wrangler as well. Fixes #416
…ode (#735) This adds support for `text_blobs`/Text module support in local mode. Now that cloudflare/miniflare#228 has landed in miniflare (thanks @caass!), we can use that in wrangler as well. Fixes #416
reopening this, waiting for the miniflare update, as well as needing to add |
importing text and data modules now works in service workers+local mode, but not plain text_blobs/data_blobs. we probably have to copy it here https://github.com/cloudflare/wrangler2/blob/b9336414c3c1ac20ba34d274042886ea802385d9/packages/wrangler/src/dev/local.tsx#L75-L82 I'll fix this tomorrow unless someone else gets to it |
One of wrangler2's highlights is having a first class module system, that brings it closer to runtimes like node/deno/etc. Further, we have pretty decent defaults ootb - common module types (
js
/jsx
/ts
/tsx
/json
) don't need any configuration, and non-"standard" modules (wasm
/txt
/html
) work as expected. There are a few corner cases though, and a little more we can do to make this story feel more complete..wasm
modules should 'just work' in service-worker format workers. We already do the same for standard and the other non-standard module types, so this would just complete the story. (It would be implemented on top of feat: support[wasm_modules]
for service-worker format workers #409) - fixed in feat: import.wasm
modules in service worker format workers #432[build.upload.rules]
for es module workers, and so should wrangler 2, but for both modules and service-worker formats. The most common usecase is to add more extensions to be recognised asText
, but I'd imagine some folks will wantData
as well.(This work is separate from the work for plugins (#367), which we'll get to later.)
The text was updated successfully, but these errors were encountered: