-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix bug with imports
field from a nested directory
#5366
Merged
Merged
Conversation
This file contains 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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
8 Ignored Deployments
|
✅ This change can build |
Linux Benchmark for 2ecc672Click to view benchmark
|
MacOS Benchmark for 2ecc672
Click to view full benchmark
|
ForsakenHarmony
approved these changes
Jun 23, 2023
jridgewell
added
the
pr: automerge
Kodiak will merge these automatically after checks pass
label
Jun 23, 2023
|
jridgewell
force-pushed
the
jrl-subpath-imports
branch
from
June 23, 2023 16:49
f17a332
to
0abb53d
Compare
Linux Benchmark for 510d869
Click to view full benchmark
|
jridgewell
force-pushed
the
jrl-subpath-imports
branch
from
June 23, 2023 18:30
0abb53d
to
af09d65
Compare
Linux Benchmark for d934fbeClick to view benchmark
|
MacOS Benchmark for d934fbe
Click to view full benchmark
|
sokra
added a commit
to vercel/next.js
that referenced
this pull request
Jun 29, 2023
Reverts #51940 ### What? Update SWC crates and turbopack ### Turbopack Updates * vercel/turborepo#5366 <!-- Justin Ridgewell - Fix bug with `imports` field from a nested directory --> * vercel/turborepo#5361 <!-- Tobias Koppers - update for next.js changes to env vars --> * vercel/turborepo#5311 <!-- OJ Kwon - test(filetrace): skip failing tests --> * vercel/turborepo#5402 <!-- Leah - reduce indent in `analyze_ecmascript_module` by splitting the function up --> * vercel/turborepo#5412 <!-- Leah - Update `swc_core` to `v0.78.24` --> Closes WEB-1174 Turbopack counterpart: vercel/turborepo#5412 --------- Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
ForsakenHarmony
pushed a commit
to vercel/next.js
that referenced
this pull request
Jul 25, 2024
…o#5366) ### Description When importing a `#foo` subpath import, the resolved file is relative the the `package.json` containing the `imports` field, not the file with the import statement. This fixes subpath imports to use the proper context path during that resolve. ### Testing Instructions ``` RUST_BACKTRACE=1 cargo nextest run -p turbopack-tests -E 'test(snapshot__imports__subpath_imports_nested)' --no-capture ``` Fixes WEB-1216
ForsakenHarmony
pushed a commit
to vercel/next.js
that referenced
this pull request
Jul 29, 2024
…o#5366) ### Description When importing a `#foo` subpath import, the resolved file is relative the the `package.json` containing the `imports` field, not the file with the import statement. This fixes subpath imports to use the proper context path during that resolve. ### Testing Instructions ``` RUST_BACKTRACE=1 cargo nextest run -p turbopack-tests -E 'test(snapshot__imports__subpath_imports_nested)' --no-capture ``` Fixes WEB-1216
ForsakenHarmony
pushed a commit
to vercel/next.js
that referenced
this pull request
Aug 1, 2024
…o#5366) ### Description When importing a `#foo` subpath import, the resolved file is relative the the `package.json` containing the `imports` field, not the file with the import statement. This fixes subpath imports to use the proper context path during that resolve. ### Testing Instructions ``` RUST_BACKTRACE=1 cargo nextest run -p turbopack-tests -E 'test(snapshot__imports__subpath_imports_nested)' --no-capture ``` Fixes WEB-1216
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.
Description
When importing a
#foo
subpath import, the resolved file is relative the thepackage.json
containing theimports
field, not the file with the import statement. This fixes subpath imports to use the proper context path during that resolve.Testing Instructions
Fixes WEB-1216