-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Can It Support Typescript? #154
Comments
It supports typescript, no need to config anything though. |
Or directly at the index.js or is a .html file always required? |
It can also be a js file or pointing it directly at a Typescript file also works |
Right, because this also worked for me as our projects are not included in an index.html document at compile time. I am not sure if it was mentioned in the docs / get startet that the given entry file can be also one of the many supported ecmascript subsets. Just saw the example with the index.html. |
I've created minimum typescript example. |
@jimmycarry if these answers resolved your question, could you close the issue? |
Seems like one needs to rename the file from *.ts to *.tsx to support the JSX syntax? Otherwise parcel will complain " Unterminated regular expression" for the first encountered JSX tag. |
hello this exists now! https://github.com/sw-yx/create-react-app-parcel-typescript |
I tried converting nodejs to parcel for this and dist folder just skipped ts files. PS: didn't target ts files |
For the record, while ParcelJS technically supports TypeScript, it ignores all errors in your code. This is a big deal for (at least some) TypeScript users. If you want errors, you need to use a plugin, but that also didn't work out for us due to a bug in that plugin. I personally wouldn't recommend it for TypeScript projects at this time, as impressive as the build times are. |
I suppose using VSCode is good enough to identifying type errors. I belief typescript itself doesn't actually stop compilation on type error. |
It doesn't work without configuration if you want to use react and TS |
As My Title If It Support Typescript How To Config It
The text was updated successfully, but these errors were encountered: