Webpack and babel settings for react and typescript without using create-react-app
Clone repo, cd into folder and run:
$ sudo npm install
$ npm start
-
Create new project
To create new project, deletepackage-lock.json
then change thename
inpackage.json
and run$ sudo npm install
-
Update origin master (if did
git clone
rather than fork)Make new repository in github, change the orgin url as
git remote set-url <name> <newurl>
beforepush origin master
example: ``` ➜ react-ts-todo git:(master) git remote -v origin https://github.com/roy1210/react-ts-webpack.git (fetch) origin https://github.com/roy1210/react-ts-webpack.git (push) ➜ react-ts-todo git:(master) git remote set-url origin https://github.com/roy1210/react-ts-todo.git ➜ react-ts-todo git:(master) git remote -v origin https://github.com/roy1210/react-ts-todo.git (fetch) origin https://github.com/roy1210/react-ts-todo.git (push) ```
Alternately, you may run
$ git remote remove origin
beforegit remote add origin <new url>
OR just fork this repo.
- npm
Run following command if react app with typescript created by $ npm create-react-app AppName
$ npm i typescript @types/node @types/react @types/react-dom