From 6027cea244bc7e6e9c1dd97a10fc6e4c986708fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Zi=C3=83=C2=B3=C3=85=E2=80=9Akowski?= Date: Wed, 26 Jun 2024 08:25:13 +0000 Subject: [PATCH] Build: Remove legacy webpack DefinePlugin configuration Follow-up [58193]. Fixes #61262. Props jonsurrell. git-svn-id: https://develop.svn.wordpress.org/trunk@58577 602fd350-edb4-49c9-b593-d223f7449a82 --- tools/webpack/shared.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/tools/webpack/shared.js b/tools/webpack/shared.js index ec12959351151..9cfd335176492 100644 --- a/tools/webpack/shared.js +++ b/tools/webpack/shared.js @@ -41,15 +41,6 @@ const getBaseConfig = ( env ) => { watch: env.watch, plugins: [ new DefinePlugin( { - /* - * These variables are part of https://github.com/WordPress/gutenberg/pull/61486 - * They're expected to be released in an upcoming version of Gutenberg. - * - * Defining this before the packages are released is harmless. - * - * @todo Remove the non-globalThis defines here when packages have been upgraded to the globalThis versions. - */ - // Inject the `IS_GUTENBERG_PLUGIN` global, used for feature flagging. 'globalThis.IS_GUTENBERG_PLUGIN': JSON.stringify( false ), // Inject the `IS_WORDPRESS_CORE` global, used for feature flagging. @@ -58,13 +49,6 @@ const getBaseConfig = ( env ) => { 'globalThis.SCRIPT_DEBUG': JSON.stringify( mode === 'development' ), - - // Inject the `IS_GUTENBERG_PLUGIN` global, used for feature flagging. - 'process.env.IS_GUTENBERG_PLUGIN': JSON.stringify( false ), - // Inject the `IS_WORDPRESS_CORE` global, used for feature flagging. - 'process.env.IS_WORDPRESS_CORE': JSON.stringify( true ), - // Inject the `SCRIPT_DEBUG` global, used for dev versions of JavaScript. - SCRIPT_DEBUG: JSON.stringify( mode === 'development' ), } ), ], };