From 4f7c799c6dca61f5a9ba033d657881db5033bbf6 Mon Sep 17 00:00:00 2001 From: blam Date: Mon, 22 Aug 2022 11:40:14 +0200 Subject: [PATCH] Added some more notes to the changeset Signed-off-by: blam --- .changeset/nervous-rivers-sneeze.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.changeset/nervous-rivers-sneeze.md b/.changeset/nervous-rivers-sneeze.md index f0abb16700..e190a8bc47 100644 --- a/.changeset/nervous-rivers-sneeze.md +++ b/.changeset/nervous-rivers-sneeze.md @@ -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" + } +} +```