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
very dynamic requests will only lead to a warning #7640
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
5 Ignored Deployments
|
🟢 Turbopack Benchmark CI successful 🟢Thanks |
✅ This change can build |
|
let visitor = match self.ty { | ||
DynamicExpressionType::Normal => { | ||
create_visitor!(path, visit_mut_expr(expr: &mut Expr) { | ||
*expr = quote!("(() => { const e = new Error(\"Cannot find module as expression is too dynamic\"); e.code = 'MODULE_NOT_FOUND'; throw e; })()" as Expr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will completely throw away information about what would have been called
can we add something back so it shows up in the stack trace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Giving the inline function a name would probably work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to source mapping the error will point to the actual user code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the stack trace still won't contain a require
/import
they no longer lead to an additional module not found error
1702a06
to
c8c996d
Compare
# Turbopack * vercel/turbo#7625 <!-- Tobias Koppers - generate calls of bindings correctly without this context --> * vercel/turbo#7621 <!-- Donny/강동윤 - fix: Fix purity lint for CSS Modules in swc mode --> * vercel/turbo#7640 <!-- Tobias Koppers - very dynamic requests will only lead to a warning --> * vercel/turbo#7639 <!-- Donny/강동윤 - build: Update `swc_core` to `v0.90.17` --> ### What? Update turbopack ### Why? To keep in sync ### How?
Description
they no longer lead to an additional module not found error
Testing Instructions
Closes PACK-2673