diff --git a/apps/wpcom-block-editor/webpack.config.js b/apps/wpcom-block-editor/webpack.config.js index 2edae34bd90456..4f064fa03842c1 100644 --- a/apps/wpcom-block-editor/webpack.config.js +++ b/apps/wpcom-block-editor/webpack.config.js @@ -59,6 +59,10 @@ function getWebpackConfig( ...webpackConfig.plugins.filter( ( plugin ) => plugin.constructor.name !== 'DependencyExtractionWebpackPlugin' ), + /** + * This is needed for import-ing ThemeUpgradeModal, + * which is directly due to the use of NODE_DEBUG in the package called `util`. + */ new webpack.DefinePlugin( { 'process.env.NODE_DEBUG': JSON.stringify( process.env.NODE_DEBUG || false ), } ),