Use chunk id instead of generated name to reduce filename length. (https://github.com/woocommerce/woocommerce-admin/pull/4535)

This commit is contained in:
Jeff Stieler 2020-06-10 17:41:27 -05:00 committed by GitHub
parent 30a9c32c85
commit d1c178a75b
1 changed files with 2 additions and 1 deletions

View File

@ -101,7 +101,7 @@ const webpackConfig = {
? `wp-admin-scripts/[name].min.js` ? `wp-admin-scripts/[name].min.js`
: `[name]/index.min.js`; : `[name]/index.min.js`;
}, },
chunkFilename: `chunks/[name].[chunkhash].min.js`, chunkFilename: `chunks/[id].[chunkhash].min.js`,
path: path.join( __dirname, 'dist' ), path: path.join( __dirname, 'dist' ),
library: [ 'wc', '[modulename]' ], library: [ 'wc', '[modulename]' ],
libraryTarget: 'this', libraryTarget: 'this',
@ -226,6 +226,7 @@ const webpackConfig = {
} ), } ),
new MiniCssExtractPlugin( { new MiniCssExtractPlugin( {
filename: './[name]/style.css', filename: './[name]/style.css',
chunkFilename: './chunks/[id].style.css',
} ), } ),
new CopyWebpackPlugin( new CopyWebpackPlugin(
wcAdminPackages.map( ( packageName ) => ( { wcAdminPackages.map( ( packageName ) => ( {