Hi! I'm Marcus.
This is my 2nd article in my Front End series.
Each article will be written to read in 5 mins per purpose itself. I'll make a video for more understanding if possible.
Table of contents:
- Part 1: Setup Snowpack
- Part 2: Installing TypeScript and Setting Up Development
Today I'll guide you on Installing TypeScript and Setting Up Development project.
For now our project structure looks like this
npm i typescript @types/react @types/react-dom -D
Now you can run project
npm run start
But we should create a
tsconfig.json file to configure our typescript project
tsconfig.json should look like this
For now, our project looks good and run perfectly. But when open
index.tsx we'll see a redundant import line here
What will happen if we remove it?
npm i @snowpack/plugin-babel @babel/preset-typescript @babel/preset-react -D
We need install
@babel/preset-react to resolve above issue
@snowpack/plugin-babel to integrate it into
Thanks for your reading, see you in next article
Part 3: Installing SASS/SCSS and Setting Up CSS Module