Added some more notes to the changeset

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2022-08-22 11:40:14 +02:00
parent 4c85095c1f
commit 4f7c799c6d
+14
View File
@@ -24,3 +24,17 @@ jest.mock(
commandExists(...args),
);
```
You can also remove any occurences of `hot(App)` and any import of `react-hot-loader` if you're using the that package locally, as all this has now been replaced with [React Refresh](https://www.npmjs.com/package/react-refresh) which you will get out of the box with the new CLI.
**Note** If you're experiencing difficulties with running tests after the migration, please reach out to us on Discord to see if we can help, or raise an issue. But in the meantime you can switch back to the existing behaviour by using the following config in your root `package.json`.
```json
"jest": {
"transform": {
"\\.(js|jsx|ts|tsx|mjs|cjs)$": "@backstage/cli/config/jestSucraseTransform.js",
"\\.(bmp|gif|jpg|jpeg|png|frag|xml|svg|eot|woff|woff2|ttf)$": "@backstage/cli/config/jestFileTransform.js",
"\\.(yaml)$": "jest-transform-yaml"
}
}
```