diff --git a/webpack.config.js b/webpack.config.js index 391cf5490e136..1d1eabd30278a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -282,7 +282,11 @@ function getWebpackConfig( { externalizeWordPressPackages = false } = {}, argv ) }, } ), ] ), - externals: _.compact( [ externalizeWordPressPackages && wordpressExternals, 'electron' ] ), + externals: _.compact( [ + externalizeWordPressPackages && wordpressExternals, + externalizeWordPressPackages && 'wp', + 'electron', + ] ), }; if ( calypsoEnv === 'desktop' ) {