We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1db52b commit 3a5b61cCopy full SHA for 3a5b61c
apps/wpcom-block-editor/webpack.config.js
@@ -73,6 +73,13 @@ function getWebpackConfig(
73
if ( request === 'tinymce/tinymce' ) {
74
return 'tinymce';
75
}
76
+ // Force bundling the React JSX runtime packages so that we don't have a missing `react-jsx-runtime`
77
+ // dependency on older WordPress versions that don't ship it yet.
78
+ if ( request === 'react/jsx-runtime' || request === 'react/jsx-dev-runtime' ) {
79
+ // returning null means don't externalize;
80
+ // returning undefined means call the default `requestToExternal`, which _would_ externalize `react-jsx-runtime`.
81
+ return null;
82
+ }
83
},
84
requestToHandle( request ) {
85
0 commit comments