* 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:
Albert Juhé Lluveras 2020-01-10 20:21:14 +01:00 committed by GitHub
parent 5926a56602
commit 6c806bacac
3 changed files with 2 additions and 16 deletions

View File

@ -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: [
{

View File

@ -136,7 +136,7 @@
},
{
"path": "./build/cart-frontend.js",
"maxSize": "100 kB"
"maxSize": "120 kB"
},
{
"path": "./build/*.css",

View File

@ -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;
}