-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Preact typescript pragma fix #15564
Preact typescript pragma fix #15564
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 01522da. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
@shilman Storyshots seem to fail after updating the Webpack plugin configuration to make Storybook run, but I'm unsure on how to solve the storyshots addon problems. Any pointers? |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Hey @KrofDrakula This looks really good! Thank you for this PR. I'm real sorry it's been left without any attention for so long.. I merged in next (4000+ commits behind, wow!), and I notice that the storyshots test is failing.. Could you look at this? I assume there's some babel config trickery that need the be updated to make it work. Happy to merge once that's fixed! |
@ndelangen I'll have a look; it's been a while since I dug into this. :) |
Yes I understand, mind that a dirty hack to get things working is totally acceptable here, because we're replacing storyshots with the storybook test-runner. Storyshots will not survive much longer, but we also don't want it to break by accident. |
@ndelangen Finally caught some time to fix this. The underlying issue was that Jest wasn't transpiling JSX correctly (using Also, I've had to reintroduce the Let me know if there's anything that may need a closer look at. |
@ndelangen Actually I jumped the gun on that one, the issue is with TypeScript, so will charm up a fix soon. |
@ndelangen OK, tests pass for storyshots and |
# Conflicts: # app/preact/src/server/framework-preset-preact.ts # code/examples/preact-kitchen-sink/.storybook/main.ts # code/examples/preact-kitchen-sink/src/stories/test-cases/__snapshots__/test-component.stories.storyshot # code/examples/preact-kitchen-sink/src/stories/test-cases/no-pragma.tsx # code/examples/preact-kitchen-sink/src/stories/test-cases/test-component.stories.tsx # code/examples/preact-kitchen-sink/tsconfig.json
"jsxFactory": "h", | ||
"jsxFragmentFactory": "Fragment", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KrofDrakula I updated the branch with To me this PR looks good, if the CI checks are 🟢 we can merge! |
@ndelangen Thanks, will have a look. Yeah, I wasn't too sure about the I'll have to look into that one; I'm always confused about that compile option, as it doesn't quite align with the Babel JSX plugin config. |
Issue:
What I did
automatic
runtime and setimportSource
topreact
by default. This does not require importingh
frompreact
, and importingReact
works for compatibility.tsconfig
to take account of default JSX factories inpreact-kitchen-sink
.How to test