Gradually externalize @wordpress/components
and finally opt-in all imports via DEWP
#1833
Closed
31 tasks done
Labels
type: enhancement
The issue is a request for an enhancement.
type: technical debt - dependency extraction
This issue/PR suffers from the dependency extraction and management
With the ability to selectively externalize specific imports, introduced in #1762, we can start gradually externalizing
@wordpress/components
, and finally opt-in all imports via DEWP.This issue is used to track this process and illustrate the approach.
Progress of
@wordpress/components
imports to be externalized@import "node_modules/@wordpress/components/src/button/style";
in _gutenberg-components.scss should be removed together.@import "node_modules/@wordpress/components/src/panel/style";
in _gutenberg-components.scss should be removedExternalization steps
'extracted/'
prefix to all'@wordpress/components'
imports of the selected component(s).import { Modal } from '@wordpress/components';
should be changed toimport { Modal } from 'extracted/@wordpress/components';
.Flex
,FlexBlock
andFlexItem
..gla-admin-page
in _gutenberg-components.scss.Opt-in all
@wordpress/components
imports via DEWPOnce all the externalizations are done, it should be time to opt-in
@wordpress/components
via DEWP and revert all related imports back to without theextracted/
prefix'extracted/'
prefix from all'extracted/@wordpress/components'
imports - #2055@import "node_modules/@wordpress/components/src/date-time/date/datepicker";
from _gutenberg-components.scss - #2055'@wordpress/components'
from therequestToExternal
array in the webpack config - #2055Reference
The text was updated successfully, but these errors were encountered: