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;
