You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the bundle-less case, we will use import('https://some.cnd.com/antd/es/${componentName}') to import the needed components.
But many dependencies loaded via the network will slow down the page speed (waterfall).
Such as load a button component must run the flow to download dependencies: button.js -> button-group.js -> LoadingIcon.js -> etc... and another outside-of-the-button package dependencies
To prevent the above problem, we bundle each component package, see like: import('https://some.cnd.com/antd/es/${componentName}?bundle')
And the download will be reduced to button.bundle.js and another outside-of-the-button package dependencies
When needs to config some global settings using the ConfigProvider, the context will be bundled into the config-provider.bundle.js file, so the button component will not import the same context file with the config-provider.
What does the proposed API look like?
The feature hasn't changed API, But needs to modify the packages structure: Origin structure:
What problem does this feature solve?
For the bundle-less case, we will use
import('https://some.cnd.com/antd/es/${componentName}')
to import the needed components.But many dependencies loaded via the network will slow down the page speed (waterfall).
Such as load a button component must run the flow to download dependencies:
button.js -> button-group.js -> LoadingIcon.js -> etc...
and another outside-of-the-button package dependenciesTo prevent the above problem, we bundle each component package, see like:
import('https://some.cnd.com/antd/es/${componentName}?bundle')
And the download will be reduced to
button.bundle.js
and another outside-of-the-button package dependenciesWhen needs to config some global settings using the
ConfigProvider
, the context will be bundled into theconfig-provider.bundle.js
file, so the button component will not import the same context file with the config-provider.What does the proposed API look like?
The feature hasn't changed API, But needs to modify the packages structure:
Origin structure:
New structure:
And the bundled es module will see like:
And the browser will download the same
context/inde.bundle.js
file to share the React's context to solve the problem.The text was updated successfully, but these errors were encountered: