Remove vendors-frontend from Webpack config (https://github.com/woocommerce/woocommerce-blocks/pull/1544)
* Remove vendors-frontend from Webpack config * Increase cart-frontend.js bundlewatch limit * Remove 'wc-vendors-frontend' from Cart block dependencies
This commit is contained in:
parent
5926a56602
commit
6c806bacac
|
@ -331,19 +331,6 @@ const getFrontConfig = ( options = {} ) => {
|
|||
// See https://webpack.js.org/configuration/output/#outputjsonpfunction
|
||||
jsonpFunction: 'webpackWcBlocksJsonp',
|
||||
},
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
minSize: 0,
|
||||
cacheGroups: {
|
||||
vendors: {
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
name: 'vendors',
|
||||
chunks: 'all',
|
||||
enforce: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
},
|
||||
{
|
||||
"path": "./build/cart-frontend.js",
|
||||
"maxSize": "100 kB"
|
||||
"maxSize": "120 kB"
|
||||
},
|
||||
{
|
||||
"path": "./build/*.css",
|
||||
|
|
|
@ -46,8 +46,7 @@ class Cart extends AbstractBlock {
|
|||
public function render( $attributes = array(), $content = '' ) {
|
||||
\Automattic\WooCommerce\Blocks\Assets::register_block_script(
|
||||
$this->block_name . '-frontend',
|
||||
$this->block_name . '-block-frontend',
|
||||
[ 'wc-vendors-frontend' ]
|
||||
$this->block_name . '-block-frontend'
|
||||
);
|
||||
return $content;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue