I just learned about PostCSS while looking for a way to polyfill a React application created using create-react-app
. The styling of this application is in .scss
files, not the regular .css
files.
I've been trying to follow this tutorial but it's not working. Since the tutorial is 5 years old, I don't know if it's not relevant anymore or If I'm missing configuring something.
Below is my raw package.json
. I did all the steps in the tutorial mentioned above and the only difference it makes is that I get this error message now:
Input Error: You must pass a valid list of files to parse
(node:63148) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:63148) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option
package.json:
{
"name": "ABC",
"version": "1.0.0",
"private": true,
"dependencies": {
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"@googlemaps/react-wrapper": "^1.1.26",
"@mui/icons-material": "^5.0.1",
"@mui/material": "^5.4.4",
"@reduxjs/toolkit": "^1.6.2",
"@types/grecaptcha": "^3.0.4",
"axios": "^0.23.0",
"country-state-city": "^3.1.2",
"env-cmd": "^10.1.0",
"moment": "^2.29.1",
"qs": "^6.10.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-google-recaptcha": "^2.1.0",
"react-hook-form": "^7.43.3",
"react-i18next": "^11.18.6",
"react-multi-carousel": "^2.6.5",
"react-redux": "^7.2.6",
"react-responsive": "^9.0.0-beta.6",
"react-router": "^6.8.2",
"react-router-dom": "^6.8.2",
"react-scripts": "5.0.1",
"react-toastify": "^9.1.1",
"redux": "^4.1.2",
"redux-actions": "^2.6.5",
"redux-logger": "^3.0.6",
"redux-saga": "^1.2.2",
"redux-saga-test-plan": "^4.0.6",
"simple-css-reset": "^3.0.0",
"styled-components": "^5.3.3",
"styled-system": "^5.1.5",
"typescript": "^4.9.5"
},
"scripts": {
"start": "react-scripts start",
"build": "env-cmd -f .env react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"format:check": "prettier --check .",
"format:fix": "prettier --write .",
"lint:check": "eslint .",
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.0.2",
"@types/lodash": "^4.14.179",
"@types/node": "^12.20.37",
"@types/qs": "^6.9.7",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"@types/react-google-recaptcha": "^2.1.5",
"@types/react-redux": "^7.1.20",
"@types/react-responsive": "^8.0.5",
"@types/react-router-dom": "^5.3.3",
"@types/redux-actions": "^2.6.2",
"@types/redux-immutable-state-invariant": "^2.1.2",
"@types/styled-components": "^5.1.19",
"@types/styled-system": "^5.1.15",
"@types/testing-library__jest-dom": "^5.14.5",
"eslint": "^8.36.0",
"lodash": "^4.17.21",
"prettier": "2.8.4",
"sass": "^1.58.3"
}
}
With this information is it possible to detect what I'm missing in my configuration?