-
Notifications
You must be signed in to change notification settings - Fork 206
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
TypeScript support #130
Comments
Hi @KubaJastrz, Thanks for your work! Maybe we should set the We have a utility for that. Want to make a PR? |
Sure, I can take a look. What about file extensions? Should we just include them always? |
Yeah, I think that's the simplest and doesn't really have a negative impact. |
Okay, so the only step for the developer would be to create a custom |
Yeah, I think that's it. Though we might be able to add that preset automatically if we detect a |
True, I've actually implemented that as well but basing on |
🎉 This issue has been resolved in version 5.7.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Hi, I wanted to start working on testing-library/dom-testing-library#494 but it seems like
kcd-scripts
doesn't support transpilation of TypeScript files.kcd-scripts
version: 5.6.1node
version: 12.11.0npm
(oryarn
) version: N/AWhat you did:
I cloned https://github.com/testing-library/dom-testing-library, renamed
src/index.js
tosrc/index.ts
and started working on enabling TS support.Changing input file was easy:
I've added
typescript
and@babel/preset-typescript
dependencies and babel config:This is where the issue comes. Because
kcd-scripts
doesn't support overriding rollup plugins, I can't addextensions: ['.js, '.ts']
torollupBabel
andnodeResolve
plugins. Also, I need to useruntimeHelpers: true
for some reason, but I use custom babel config so this line is stopping me as well:kcd-scripts/src/config/rollup.config.js
Line 155 in 9f75a86
Problem description:
I need to customize some plugins in rollup configuration.
Suggested solutions (pick one):
runtimeHelpers: true
under some condition. A flag maybe? Or automatic detection based on input file extension?This is how I visualize 3rd option:
The text was updated successfully, but these errors were encountered: