npm install --global yarn
yarn --version
npx create-react-app . --template redux-typescript
yarn add -D tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9
yarn add @craco/craco
https://tailwindcss.com/docs/guides/create-react-app
{
// ...
"scripts": {
"start": "craco start",
"build": "craco build",
"test": "craco test",
// ...
},
}
touch craco.config.js
module.exports = {
style: {
postcss: {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
],
},
},
}
npx tailwindcss init -p
module.exports = {
purge: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'],
darkMode: false,
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
}
@tailwind base;
@tailwind components;
@tailwind utilities;
yarn add react-query react-query-devtools react-router-dom @types/react-router-dom axios@0.21.1 @heroicons/react@1.0.6
touch .prettierrc
{
"singleQuote": true,
"semi": false
}