Update admin webpack config to resolve wp.components.ui
This commit is contained in:
parent
4a6c3300aa
commit
5063dc3640
|
@ -165,7 +165,14 @@ const webpackConfig = {
|
|||
|
||||
// We reuse this Webpack setup for Storybook, where we need to disable dependency extraction.
|
||||
! process.env.STORYBOOK &&
|
||||
new WooCommerceDependencyExtractionWebpackPlugin(),
|
||||
new WooCommerceDependencyExtractionWebpackPlugin( {
|
||||
requestToExternal( request ) {
|
||||
if ( request === '@wordpress/components/build/ui' ) {
|
||||
// The external wp.components does not include ui components, so we need to skip requesting to external here.
|
||||
return null;
|
||||
}
|
||||
},
|
||||
} ),
|
||||
// Reduces data for moment-timezone.
|
||||
new MomentTimezoneDataPlugin( {
|
||||
// This strips out timezone data before the year 2000 to make a smaller file.
|
||||
|
|
Loading…
Reference in New Issue