Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tree-shaking support #84

Open
ovchinnikov opened this issue May 4, 2018 · 2 comments
Open

Tree-shaking support #84

ovchinnikov opened this issue May 4, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@ovchinnikov
Copy link
Contributor

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

@lukyanovas lukyanovas added the bug Something isn't working label May 8, 2018
@lukyanovas
Copy link
Contributor

lukyanovas commented Aug 6, 2018

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.

@lukyanovas lukyanovas added enhancement New feature or request and removed bug Something isn't working labels Aug 6, 2018
@lukyanovas lukyanovas changed the title Large bundle size Tree-shaking support Aug 6, 2018
@IlyaKhD
Copy link
Contributor

IlyaKhD commented Aug 24, 2020

We're going to deliver a set of ES6 modules starting with v20.2, see DevExpress/DevExtreme#14351 for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants