Strip query strings from module names when writing to disk#12824
Strip query strings from module names when writing to disk#12824jamesopstad merged 1 commit intomainfrom
Conversation
🦋 Changeset detectedLatest commit: beacef5 The changes in this PR will be included in the next version bump. 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 |
|
Codeowners approval required for this PR:
Show detailed file reviewers |
|
✅ All changesets look good |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
petebacondarwin
left a comment
There was a problem hiding this comment.
LGTM - one question... there appears to be more than 2 possible code paths covered by these changes but only two tests. Are we missing tests for some scenarios?
The change is only needed in the path that is being tested. It felt more consistent to use the |
Fixes #11535.
Strip query strings from module names before writing to disk
When bundling modules with query string suffixes (e.g.
.wasm?module), the?character was included in the output filename. Since?is not a valid filename character on Windows, this caused an ENOENT error duringwrangler dev. This was particularly visible when using Prisma Client with the D1 adapter, which imports.wasm?modulefiles.The fix strips query strings from module names before writing them to disk, while preserving correct module resolution.
A picture of a cute animal (not mandatory, but encouraged)