这是我第一次使用 Tailwind CSS 来设计我的 React 应用程序。当我在本地运行应用程序时,它的样式非常完美,但是,既然我已经使用它进行了部署gh-pages
,则无需应用任何样式。我需要更改我的 package.json 文件或其他内容吗?
{
"name": "seafaring",
"version": "0.1.0",
"private": true,
"homepage": "https://superhackerboy.github.io/sweet-seafaring-dreams/",
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"axios": "^0.19.2",
"gh-pages": "^2.2.0",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-scripts": "3.4.0"
},
"scripts": {
"build:css": "postcss src/styles/tailwind.css -o src/styles/index.css",
"watch:css": "postcss src/styles/tailwind.css -o src/styles/index.css --watch",
"start": "cross-env NODE_ENV=development concurrently \"npm run watch:css\" \"react-scripts start\"",
"build": "cross-env NODE_ENV=production concurrently \"npm run build:css\" \"react-scripts build\"",
"test": "react-scripts test",
"predeploy": "npm run build",
"deploy": "gh-pages -d …
Run Code Online (Sandbox Code Playgroud)