-
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
Glob-style Imports in .tsx Files Not Bundled Correctly #3319
Comments
This also does not work for regular typescript files. As a workaround it is possible to put the import in a |
I have the exact same problem. I converted by js file to ts and the import stopped working. I assume it has something to do with esbuild not knowing if the import is a type import or an actual import (because it cant statically analyze it) when loading from a ts file (loading typescript files from a js file is fine because you cant ever import types into js) |
I have a function within a
.tsx
file that looks something like:When bundled, I see that the import is replaced by a call to
globImport_...
, but that variable is not defined anywhere in the bundle.If I move the above function into a
.js
file, it works correctly.The text was updated successfully, but these errors were encountered: