-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Dynamic import(): how to ignore an import that’s passed a variable? #574
Comments
This is a general problem with warnings in esbuild. Currently there isn't a built-in way to filter specific warnings. Some options:
|
Thank you, that makes sense! I agree that this warning seems totally reasonable (and FWIW the code isn’t handling |
In our codebase, there’re a few cases where we deliberately use a native
import()
with a variable, like:This works in webpack thanks to
/* webpackIgnore: true */
(docs). But in ESBuild, this produces a warning like:Is there any way to silence this warning for such import? If this was a string literal, I’d add it into
externals
, but I can’t do that with a variable.The text was updated successfully, but these errors were encountered: