Skip to content

Commit

Permalink
fix(#36651): disable reactRemoveProperties in jest transform
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed May 15, 2022
1 parent fa4ca66 commit 9b8c396
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/next/build/swc/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ function getBaseSWCOptions({
}
: null,
removeConsole: nextConfig?.compiler?.removeConsole,
reactRemoveProperties: nextConfig?.compiler?.reactRemoveProperties,
// disable "reactRemoveProperties" when "jest" is true
// otherwise the setting from next.config.js will be used
reactRemoveProperties: jest
? false
: nextConfig?.compiler?.reactRemoveProperties,
modularizeImports: nextConfig?.experimental?.modularizeImports,
relay: nextConfig?.compiler?.relay,
emotion: getEmotionOptions(nextConfig, development),
Expand Down

0 comments on commit 9b8c396

Please sign in to comment.