Change delimiter used for spltChunks from tilde to hyphens (https://github.com/woocommerce/woocommerce-blocks/pull/3360)

* Change delimiter used for chunks to hyphens

* Add automaticNameDelimiter to all configs
This commit is contained in:
Mike Jolley 2020-11-09 10:44:58 +00:00 committed by GitHub
parent e09444c525
commit 5a450fc142
1 changed files with 17 additions and 0 deletions

View File

@ -64,6 +64,11 @@ const getCoreConfig = ( options = {} ) => {
// See https://webpack.js.org/configuration/output/#outputjsonpfunction
jsonpFunction: 'webpackWcBlocksJsonp',
},
optimization: {
splitChunks: {
automaticNameDelimiter: '--',
},
},
module: {
rules: [
{
@ -133,6 +138,7 @@ const getMainConfig = ( options = {} ) => {
optimization: {
splitChunks: {
minSize: 0,
automaticNameDelimiter: '--',
cacheGroups: {
commons: {
test: /[\\/]node_modules[\\/]/,
@ -214,6 +220,11 @@ const getFrontConfig = ( options = {} ) => {
// See https://webpack.js.org/configuration/output/#outputjsonpfunction
jsonpFunction: 'webpackWcBlocksJsonp',
},
optimization: {
splitChunks: {
automaticNameDelimiter: '--',
},
},
module: {
rules: [
{
@ -307,6 +318,11 @@ const getPaymentsConfig = ( options = {} ) => {
// See https://webpack.js.org/configuration/output/#outputjsonpfunction
jsonpFunction: 'webpackWcBlocksPaymentMethodExtensionJsonp',
},
optimization: {
splitChunks: {
automaticNameDelimiter: '--',
},
},
module: {
rules: [
{
@ -410,6 +426,7 @@ const getStylingConfig = ( options = {} ) => {
optimization: {
splitChunks: {
minSize: 0,
automaticNameDelimiter: '--',
cacheGroups: {
editor: {
// Capture all `editor` stylesheets and editor-components stylesheets.