Skip to content

Commit 5605cbc

Browse files
committed
Disable @babel/plugin-transform-react-constant-elements
Unfortunately, this plugin is still buggy and caches elements that shouldn't be. I spent another hour debugging issues due to this. The one I'd previously found (https://github.com/mwiencek/babel-issue-11686) was fixed, but the latest version has other issues I can't be bothered to report. It's safer to avoid this plugin at all costs. Note that if a React element is truly constant, we can just move it to an outer scope ourselves! Nothing this plugin does is magic.
1 parent 1f6bd97 commit 5605cbc

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

babel.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ module.exports = function (api) {
3030
['@babel/plugin-transform-react-jsx', {
3131
runtime: 'automatic',
3232
}],
33-
'@babel/plugin-transform-react-constant-elements',
3433
['@babel/plugin-transform-runtime', {
3534
corejs: false,
3635
helpers: true,

0 commit comments

Comments
 (0)