This article is part of a two part series on how to configure a React app from scratch with Webpack and Babel and eventually add TypeScript to it. ...
For further actions, you may consider blocking this person and/or reporting abuse
Thanks for the article.
I have implemented webpack and babel to our reactjs ts project. However, on development, I cannot see codes as in writed in ts. I see all changed.
And I cannot found the way keep codes same while developing.
Maybe you could help me with a sample component and what issue you are facing! Would be happy to help you with that.
One quick question, what is the point of using babel-loader if we are using Typescript and ts-loader / tsconfig for compiling?
You can keep only ts-loader for compiling. I added typescript on top of my webpack JS repo, so it already had the babel-loader, which I might have forgotten to remove at that time.
Thanks, that helped a lot!
Great Article - Thanks!
Thank you!!! Great article!
Thank you for your feedback! 😄
Don't
babel-loader
withts-loader
(remove this one!) upon babel 7! I hope this will save someone debugging in the future! ReferenceThat's not entirely true for real-time type checking. If
ts-loader
is removed, type-checking must be done usingtsc
or similar. Babel will not run type checks (devblogs.microsoft.com/typescript/...). So yes, Babel understands TypeScript in Babel 7 now, which is great. But if someone is using the webpack dev server as in this post, they may want type-checking to happen upon every recompile.In my experience, the easiest way to do that is to simply use both loaders in the rule, like this:
nice tutorial, thank you
Thanks 😁
Great article! Thank you
Thanks 😁