npx create-react-app cra-typescript-pug --template typescript --use-npm
npm install --save-dev react-app-rewired customize-cra
npm install --save-dev babel-plugin-transform-jsx-classname-components babel-plugin-transform-react-jsx babel-plugin-transform-react-pug eslint-plugin-react-pug webpack-preprocessor-pug-tsx
package.json
:
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test"
},
...
"eslintConfig": {
...
"plugins": [
"react-pug"
...
],
...
},