You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preact-CLI uses the classic JSX transform (in v3, this will change in v4) which means compiling to h() calls. As such, you should be importing h into every JSX/TSX file you have. However, as a convenience thing, we use Webpack's ProvidePlugin to inject h and Fragment imports into all modules automatically. Think of this as a poor man's runtime transform (and much older). This does not play nicely with TS though and there's no way around that.
Altering the tsconfig.json in this way is incorrect, as you're telling TS you're using the runtime transform (to avoid needing to import h) when in reality we're using the classic transform.
Hey. I kept getting this error, related probably to preactjs/preact#3180 and https://github.com/preactjs-templates/typescript/blob/master/template/tsconfig.json#L8 lines..
After changing tsconfig to
the problem went away. Do you think it would be ok to update the template?
The text was updated successfully, but these errors were encountered: