devextreme-react
devextreme-react copied to clipboard
Tree-shaking support
Issue Type
bug report
Steps to Reproduce
- create a new app
npx create-react-app my-app - add DevExtreme Button:
import { Button } from 'devextreme-react';
...
render() {
return (
<Button text='Example Button' />
);
}
- build project
npm run build
Current Behavior
The resulting bundle contains all DevExtreme widgets. The total bundle size is about 3MB.
Expected Behavior
The resulting bundle should contain only the dxButton widget
Hi! To decrease your bundle size, use the long path to import the DevExtreme Button.
import { Button } from "devextreme-react/ui/button";
We will investigate tree-shaking support in future versions to resolve your issue.
We're going to deliver a set of ES6 modules starting with v20.2, see https://github.com/DevExpress/DevExtreme/issues/14351 for more details.