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
Importing only Button and Checkbox, for example, should not pull in the entire Fast DataGrid component.
Current behavior
Importing anything from @vscode/webview-ui-toolkit/react pulls in every component from @vscode/webview-ui-toolkit.
Use case
I'd like to reduce my bundle size.
Screenshots/references
As a quick example, I found that duplicating @vscode/webview-ui-toolkit/react with only the two components I needed (Button and Checkbox) shaved over 100KB off my minified build size.
I also manually edited node_modules/@vscode/webview-ui-toolkit/react/index.js two add the two pure annotations per component (note you need it for both calls) and that also worked.
The text was updated successfully, but these errors were encountered:
Feature request
Mark the exported React components as pure so that bundlers can tree-shake the exports:
Expected behavior
Importing only Button and Checkbox, for example, should not pull in the entire Fast DataGrid component.
Current behavior
Importing anything from
@vscode/webview-ui-toolkit/react
pulls in every component from@vscode/webview-ui-toolkit
.Use case
I'd like to reduce my bundle size.
Screenshots/references
As a quick example, I found that duplicating
@vscode/webview-ui-toolkit/react
with only the two components I needed (Button and Checkbox) shaved over 100KB off my minified build size.I also manually edited
node_modules/@vscode/webview-ui-toolkit/react/index.js
two add the two pure annotations per component (note you need it for both calls) and that also worked.The text was updated successfully, but these errors were encountered: