-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use unique jsonpFunction name in webpack config to avoid conflict wit…
…h other plugins built with @wordpress/scripts (see: WordPress/gutenberg#23607)
- Loading branch information
1 parent
fa6f4be
commit 54f1e12
Showing
4 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '67aee816442ce60ef154e852f39f18fa'); | ||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => 'dc6e4660f672db61a119525dff6a9e5b'); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const config = require( '@wordpress/scripts/config/webpack.config' ); | ||
|
||
/** | ||
* Because the block and the package have their own webpack configuration, | ||
* they must provide a unique name for the global scope (which is used to lazy-load chunks), | ||
* otherwise it throws a JS error when loading blocks compiled with `npm run build` | ||
* | ||
* @see https://github.com/WordPress/gutenberg/issues/23607 | ||
* @see https://v4.webpack.js.org/configuration/output/#outputjsonpfunction | ||
*/ | ||
// ------------------------------------------------------ | ||
config.output.jsonpFunction = 'wpBootstrapBlocksJsonpFn'; | ||
// ------------------------------------------------------ | ||
|
||
module.exports = config; |