Use chunk id instead of generated name to reduce filename length. (https://github.com/woocommerce/woocommerce-admin/pull/4535)
This commit is contained in:
parent
30a9c32c85
commit
d1c178a75b
|
@ -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 ) => ( {
|
||||||
|
|
Loading…
Reference in New Issue