fix(cloudflare): use native worker module identity - #3250
Open
james-elicx wants to merge 1 commit into
Open
Conversation
Member
Author
|
/bigbonk review for issues |
@vinext/cloudflare
create-vinext-app
@vinext/types
vinext
@cloudflare/workers-response-store
commit: |
Contributor
|
Contributor
Performance benchmarksCompared 1 improved · 0 regressed · 5 within ±1.5%
View detailed results and traces 🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head |
Contributor
|
@james-elicx Bonk workflow was cancelled. View workflow run · To retry, trigger Bonk again. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
new_module_registryfor dependency ESM and emitted module URLs instead of rewritingimport.meta.urlthrough private sentinelsimport.meta.urlrewriting for Next.js parity and retain bundled CommonJS__filename/__dirnamesupportnew_module_registrypart of generated, migrated, documented, example, and test Wrangler configurationsCloudflare's registry contract now provides file URLs such as
file:///bundle/index.js: https://github.com/cloudflare/workerd/blob/main/docs/reference/detail/new-module-registry.mdProject-source rewriting remains because Next.js still specifies source-module identity: https://github.com/vercel/next.js/blob/canary/test/e2e/import-meta/import-meta.test.ts
Validation
vp checkvp run vinext#buildvp test run tests/import-meta-url.test.tsvp test run tests/init.test.tsvp test run tests/pages-router.test.ts -t 'Pages Router import.meta.url in production'vp test run tests/cjs-globals-runtime.test.ts(Node dev, Node production, Cloudflare dev, App Router Worker, Pages-only Worker, Nitro)vp test run tests/after-response-close-worker.test.ts tests/cache-adapters-build.test.ts tests/cdn-adapter-build.test.ts tests/css-url-assets.test.ts tests/static-image-emission.test.ts tests/tsconfig-path-alias-build.test.tsPLAYWRIGHT_PROJECT=cloudflare-encoded-paths pnpm run test:e2e -- module-identity.spec.ts