Skip to content

Regression from @yandex/controls@0.0.1: significantly larger bundle #5

@ykropchik

Description

@ykropchik

Hello, Yandex team!

During the migration, I found a few issues that make the new package hard to use in production.

Problems

  1. Significant bundle size increase

Here are the measurements I took using the Chrome DevTools Network tab:

  • @yandex/controls@0.0.1: ~5 KB
  • ymaps3-default-ui-theme: ~140 KB

This is a major regression, especially if you use only one or two UI components from the whole package.

  1. All UI components are shipped as a single bundle

Because of this, the bundler cannot tree-shake unused parts

Expected behavior

One of the following should be possible:

  • The package size should be much smaller so that using the full bundle does not add a large payload.

or

  • The package should allow users to import only the UI components they need, so unused components are left out of the final bundle.

Both approaches would make the package much better suited for real-world production use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions