-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
tsx should come first when chaining loaders #571
Comments
tsx
loader
@privatenumber This would also solve the fundamental problem that I flagged in the other thread – about making open-telemetry work with tsx. |
I guess if the order was swapped it would mean that I suspect the one solution might be to put the TypeScript imports after the tsx loaders and everything else before? Or maybe add another option |
Acknowledgements
Minimal reproduction URL
Below
Problem & expected behavior (under 200 words)
There were previous issues with
import-in-the-middle
which are now fixed. The issue now is thatimport-in-the-middle
cannot parse TypeScript and there's no way to get the loaders in the correct ordertest.ts
another.ts
Results in an error because
import-in-the-middle
cannot parse TypeScript:Looking at the stack before this occurs we can see that the loaders are ordered as follows, which means that the
tsx
loader is trying to fetch TypeScript code through the iitm loader:tsx > iitm > default
This is because of the following code which means that
--import
and--loader
args are always registered aftertsx
own loader:tsx/src/run.ts
Lines 36 to 46 in aa2b639
Bugs are expected to be fixed by those affected by it
Compensating engineering work financially will speed up resolution
The text was updated successfully, but these errors were encountered: