Repository navigation
Make route CommonJS require work after bundling and name unsupported packages #5472
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
Closed
Closed
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
8199211
Define the compiled-binary CJS loader for rewritten route dependency …
kojiwakayama 67372a6
Prepend the route require prologue after bundling on every runtime
kojiwakayama ffb8fc0
Name missing npm packages and native addons in the compiled CJS loader
kojiwakayama 003421f
Address review: private loader scope, nested resolution, namespace in…
kojiwakayama 15f4a64
Address review: declaration-only collisions, full namespace interop, …
kojiwakayama 1c7aaee
fix(api-routes): rewrite CJS imports from lexer spans with collision-…
kojiwakayama 3383a23
fix(api-routes): match Node CommonJS loading more closely in the comp…
kojiwakayama ad56761
fix(api-routes): cache module records and tighten local resolution in…
kojiwakayama e3d3945
fix(api-routes): handle more CommonJS import forms and module APIs
kojiwakayama 50069a4
fix(routes): link CJS module parents, honor exports for prefix-only n…
kojiwakayama c304f57
fix(routes): sealed CJS namespaces, parent.require, regex and brace-a…
kojiwakayama a4e0d40
fix(routes): isolate CJS shim intrinsics, lazy namespace getters, bui…
kojiwakayama 2e9196b
fix(routes): lexer-bounded dynamic imports, terminated rewrites, URL …
kojiwakayama fae2d59
fix(routes): contain require.resolve, canonical lookup paths, CJS imp…
kojiwakayama 4896c2a
fix(routes): CJS import options and helper naming, captured statics, …
kojiwakayama ef0bddc
fix(routes): comment/escape-aware CJS import scan, one-pass shim plac…
kojiwakayama 3077b93
fix(routes): control-flow regex scan, import option validation, requi…
kojiwakayama 53da924
fix(routes): private #import, attribute type checks, nested import ed…
kojiwakayama e224578
fix(routing): resolve relative require.resolve paths from cwd; read /…
kojiwakayama 76f2685
fix(routing): keep the CJS loader independent of replaceable built-in…
kojiwakayama 3346cd7
fix(routing): object-literal division, package imports and hoisted fa…
kojiwakayama a118734
fix(routing): read import options before the await, bound package loo…
kojiwakayama File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
288 changes: 265 additions & 23 deletions
288
src/routing/api/module-loader/external-import-rewriter.test.ts
Large diffs are not rendered by default.
Oops, something went wrong.
1,034 changes: 980 additions & 54 deletions
1,034
src/routing/api/module-loader/external-import-rewriter.ts
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.