Build: Remove polyfills from block view scripts

Related changes in Gutenberg: https://github.com/WordPress/gutenberg/pull/35038.

When adding a block with a view.js script, the frontend loads an additional ~20kb of scripts that were previously not there. These are coming from polyfills that are defined as a dependency for view.js scripts.
Since WordPress dropped support for IE, these polyfills are no longer needed and can be removed.

Follow-up to [51501].
See #53690.
Props aristath.



git-svn-id: https://develop.svn.wordpress.org/trunk@52011 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Greg Ziółkowski 2021-11-04 15:56:06 +00:00
parent 40ac5de838
commit 1918fe9e25
3 changed files with 3 additions and 3 deletions

View File

@ -1 +1 @@
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '499eaf2efb98327a07f222e92d742380');
<?php return array('dependencies' => array(), 'version' => '499eaf2efb98327a07f222e92d742380');

View File

@ -1 +1 @@
<?php return array('dependencies' => array('wp-polyfill'), 'version' => 'e8d668b8e69d9bf1c99dc250d92f2b72');
<?php return array('dependencies' => array(), 'version' => 'e8d668b8e69d9bf1c99dc250d92f2b72');

View File

@ -178,7 +178,7 @@ module.exports = function( env = { environment: 'production', watch: false, buil
),
} ),
new DependencyExtractionPlugin( {
injectPolyfill: true,
injectPolyfill: false,
} ),
new CopyWebpackPlugin(
[