Вот моя установка: < /p>
Код: Выделить всё
npx create-react-app web
npm install --save-dev typescript @types/node @types/react @types/react-dom @types/jest
npx tsc --init
npm install --save-dev tailwindcss @tailwindcss/postcss postcss
Код: Выделить всё
export default {
plugins: {
"@tailwindcss/postcss": {},
}
}
Код: Выделить всё
@import "tailwindcss";
Код: Выделить всё
function App() {
return (
Hello world!
);
}
export default App;
Код: Выделить всё
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
root.render(
);
reportWebVitals();
Код: Выделить всё
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-scripts": "5.0.1",
"typescript": "^4.9.5",
"tailwindcss": "^4.0.12",
"postcss": "^8.5.3",
Подробнее здесь: https://stackoverflow.com/questions/795 ... ng-postcss