Skip to content
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(turbopack): add no-op resolveAbsolutePath to browser runtime #8549

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ForsakenHarmony
Copy link
Member

@ForsakenHarmony ForsakenHarmony commented Jun 20, 2024

Description

Reading import.meta.hot should work in the browser, it can just return a /ROOT/... path.

Fixes vercel/next.js#66005

Copy link

vercel bot commented Jun 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2024 4:22pm
rust-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2024 4:22pm
8 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Jun 20, 2024 4:22pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Jun 20, 2024 4:22pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Jun 20, 2024 4:22pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Jun 20, 2024 4:22pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Jun 20, 2024 4:22pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Jun 20, 2024 4:22pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Jun 20, 2024 4:22pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Jun 20, 2024 4:22pm

Copy link
Contributor

github-actions bot commented Jun 20, 2024

🟢 Turbopack Benchmark CI successful 🟢

Thanks

Copy link
Contributor

✅ This change can build next-swc

Copy link
Contributor

github-actions bot commented Jun 20, 2024

⚠️ CI failed ⚠️

The following steps have failed in CI:

  • Turbopack Rust tests (mac/win, non-blocking)

See workflow summary for details

Comment on lines +395 to +398
if (modulePath) {
return modulePath;
}
return "/ROOT/";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shoudn't it return something like:

Suggested change
if (modulePath) {
return modulePath;
}
return "/ROOT/";
return `/ROOT/${modulePath || ''}`;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, initially thought it was added by codegen

Copy link
Member

@sokra sokra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test case testing this behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

__turbopack_resolve_absolute_path__ is not a function
2 participants