Skip to content
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

Closed
jimmycarry opened this issue Dec 9, 2017 · 13 comments
Closed

Can It Support Typescript? #154

jimmycarry opened this issue Dec 9, 2017 · 13 comments

Comments

@jimmycarry
Copy link

As My Title If It Support Typescript How To Config It

@DeMoorJasper
Copy link
Member

It supports typescript, no need to config anything though.
Just point it to a index.html or whatever html file that has a script tag containing the typescript entrypoint and everything should work automagically

@DanielRuf
Copy link

Or directly at the index.js or is a .html file always required?

@DeMoorJasper
Copy link
Member

DeMoorJasper commented Dec 9, 2017

It can also be a js file or pointing it directly at a Typescript file also works

@DanielRuf
Copy link

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.

@azu
Copy link

azu commented Dec 10, 2017

I've created minimum typescript example.

@DeMoorJasper
Copy link
Member

@jimmycarry if these answers resolved your question, could you close the issue?

@jimmycarry
Copy link
Author

@DeMoorJasper OK

@pke
Copy link
Contributor

pke commented Apr 20, 2018

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.

@tsiq-swyx
Copy link

hello this exists now! https://github.com/sw-yx/create-react-app-parcel-typescript

@janat08
Copy link

janat08 commented Sep 2, 2018

I tried converting nodejs to parcel for this and dist folder just skipped ts files.

PS: didn't target ts files

@rstarkov
Copy link

rstarkov commented Nov 3, 2018

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.

@janat08
Copy link

janat08 commented Nov 5, 2018

I suppose using VSCode is good enough to identifying type errors. I belief typescript itself doesn't actually stop compilation on type error.

@DmitryOlkhovoi
Copy link

DmitryOlkhovoi commented Dec 14, 2018

It doesn't work without configuration if you want to use react and TS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants