-
-
Notifications
You must be signed in to change notification settings - Fork 433
Can't import plain d.ts files when transpileOnly=true #277
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
Comments
Is there any solution for this? |
Wow, is this for real? yes it is. holy crap. totally wasted 4 hours on that. this is only clue that comes up on Google after 4 hours of banging on it with a hammer. |
Yeah, actually it is real. And I don't know a proper workaround. How do projects with external libraries like angular work in transpileOnly mode? I mean it is obviously not feasible to convert their typings into normal .ts files. |
How are you importing the module? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing as stale. Please reopen if you'd like to work on this further. |
ARRRGH! How do I fix this? All I've done is this:
The file Sorry for being a bit pissed off but this is surely a basic thing that should work, and I've been trying to solve it all day. Renaming to Please reopen this. |
Reopened. I'm not working on this, but if you'd like to have a crack at it and raise a prospective pr I'd be happy to support you |
Actually I think I was looking in the wrong place for the problem. I was using some files generated by So maybe it was working as intended all along. Sorry!! |
Hi everyone, |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
still relevant 😢 |
I'm afraid I can't spend any time looking into this directly, but if you'd like to I'd appreciate it and I'll help when I can |
Same |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing as stale. Please reopen if you'd like to work on this further. |
still relevant |
I encountered the same issue. |
Same issue, any advice? |
I have found a fairly clean workaround to this problem (specifically, for getting @joebnb, @LvChengbin, and @artyomtrityak, perhaps this strategy will work for you. Special thanks to @dhoulb for getting me on the right track in this comment. |
Removing the |
Unfortunately this does not work if d.ts file includes also something else (eg. enums) than just interfaces. |
You're right about that. You ought to be able to |
This is actually the exact same issue as I have with awesome-typescript-loader: s-panferov/awesome-typescript-loader#225:
I have a shared module for shared interfaces between my server and my client. It contains several d.ts files with interfaces I share between my server and the UI. When I use ts-loader everything works as expected, when I use this ts-loader with transpileOnly=true I get:
The shared/data should be shared/data.d.ts but it doen't find it. If I add the d.ts explicitly I get this error:
configuration:
config file:
Not critical workaround is to just change the files to ts files and transpile them to empty js files.
The text was updated successfully, but these errors were encountered: