-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Missing Imports using TSX, ellipsis and transpileOnly (ts-loader) #15727
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
Hi @olmobrutall , Temporary I used this workaround:
Use it using this variable name: Isn't ideal, but worked temporary, let's see if it's provided a quick fix for that, which seems important. Maybe in your scenario would be like: Import: Usage: <span {...this.props.spanAttrs} className={utils.classes(this.props.spanAttrs && this.props.spanAttrs.className, "sf-typeahead")}>
</span> |
Thanks for your detailed answer, indeed looks like the same problem. Are you also using TS-loader with transpileOnly? I've found workarounds but then i found another bug... The issue can also happen with imported symbols inside of the JSX element with ellipsis, not in properties. It's a set of big applications and is failing at runtime so I'll prefer a proper solution. Let's see if the sun arrives to Seattle and we get some attention :) |
Hi @olmobrutall , Actually I am using ts-loader, but not transpileOnly. |
Strage, removing transpileOnly fixed the problem in my case... |
Looks like a duplicate of #15469. should be fixed in can you give |
Looks like works 👍 |
Hi Roslyn Team,
This is a follow-up of this issue: TypeStrong/ts-loader#538
I'm responsible for a set of Framework / Applications that use TS and React intensively and trying to update to TS 2.3.
We're using webpack, ts-loader and the option
transpileOnly
that makes the initial compilation much faster (40s -> 150s).transpileOnly
will calltranspileModule
.Using this
transpileOnly
, in combination with ellipsis in TSX elements makes TS to forget importing some references.Github Repository that reproduces the problem in isolation
https://github.com/olmobrutall/tsxError
TS Source
JS Full compilation (Right)
JS Transpilation (Wrong)
Thanks for the nice work :)
The text was updated successfully, but these errors were encountered: