@ackee/react-scripts@2.0.0
@ackee/react-script@2.0.0
💥 Breaking changes
-
Add
extensionsto eslint config:"settings": { "import/resolver": { "node": { "paths": ["src"], + "extensions": [".js", ".jsx"] } } }, -
Replace
BUILD_ENVand--targetwithREACT_APP_BUILD_ENV:Update
config/config.js:- const envConfig = require(`./config.${process.env.BUILD_ENV}.js`).default; + const envConfig = require(`./config.${process.env.REACT_APP_BUILD_ENV}.js`).default;
Update
build:*scripts inpackage.json:- "build:development": "react-scripts build --target=development", - "build:master": "react-scripts build --target=production", - "build:stage": "react-scripts build --target=stage", + "build:development": "export REACT_APP_BUILD_ENV=development; react-scripts build", + "build:stage": "export REACT_APP_BUILD_ENV=stage; react-scripts build", + "build:master": "export REACT_APP_BUILD_ENV=production; react-scripts build",
Update
startscript inpackage.json- prependexport REACT_APP_BUILD_ENV=development;:- "start": "yarn localize && react-scripts start", + "start": "export REACT_APP_BUILD_ENV=development; yarn localize && react-scripts start",
Update
testscript/s inpackage.json- prependexport REACT_APP_BUILD_ENV=test;:- "test": "react-scripts test", + "test": "export REACT_APP_BUILD_ENV=test; react-scripts test",
-
Update the eslint config:
- "extends": ["react-app", "@ackee/eslint-config", "prettier"], + "extends": ["@ackee/eslint-config", "prettier"],
-
Disable
FAST_REFRESHfor now - it doesn't work
In.env:+ FAST_REFRESH=false -
Remove
EXTEND_ESLINT- it is no longer required to customize the ESLint config
In.env:- EXTEND_ESLINT=false -
(Possible breaking change) Jest has been upgraded to v26 and
resetMocks: trueis set by default. -
Remove
cypress
If you're using it in your project, install it manually:yarn add cypress@latest eslint-plugin-cypress@latest -D
-
Upgrade
react-scripts@4.0.0- changelog includes following breaking changes that relates to@ackee/react-script: -
Add
typescriptpackage (for TypeScript projects only)
typescripthas been move topeerDependencies, so you need to install it manually:yarn add typescript -D
-
Add
src/servicer-worker.jsorsrc/servicer-worker.tsStarting with Create React App 4, you can add a src/service-worker.js file to your project to use the built-in support for Workbox's InjectManifest plugin, which will compile your service worker and inject into it a list of URLs to precache.
See more at https://create-react-app.dev/docs/making-a-progressive-web-app/ -
⚠️ To prevent unexpected issues, do a clean install as the last step:
rm -rf ./node_modules && yarn🚀 New features
- Upgrade
@ackee/eslint-config@3.0.0 - Upgrade
worker-plugin@5.0.0 - Upgrade
madge@4.0.2