How to use the @wordpress/dependency-extraction-webpack-plugin/util.defaultRequestToHandle function in @wordpress/dependency-extraction-webpack-plugin

To help you get started, we’ve selected a few @wordpress/dependency-extraction-webpack-plugin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github getblocklab / block-lab / webpack.config.js View on Github external
requestToHandle: ( request ) => {
				switch ( request ) {
					case '@wordpress/dom-ready':
					case '@wordpress/i18n':
					case '@wordpress/server-side-render':
					case '@wordpress/url':
						return undefined;

					default:
						return defaultRequestToHandle( request );
				}
			},
			requestToExternal: ( request ) => {
github ampproject / amp-wp / webpack.config.js View on Github external
requestToHandle: ( request ) => {
				switch ( request ) {
					case '@wordpress/dom-ready':
					case '@wordpress/i18n':
					case '@wordpress/polyfill':
					case '@wordpress/url':
						return undefined;

					default:
						return defaultRequestToHandle( request );
				}
			},
			requestToExternal: ( request ) => {

@wordpress/dependency-extraction-webpack-plugin

Extract WordPress script dependencies from webpack bundles.

GPL-2.0-or-later
Latest version published 1 day ago

Package Health Score

95 / 100
Full package analysis