Skip to content

Improve tree shaking of bundled output #978

@jleifeld

Description

@jleifeld

Package(s)

@meteor/component-library

Current Situation

The current distributed bundle contains a big JS and CSS file even when you just need a few component. This leads to longer loading times in the Shopware 6 administration even when only a few components are used:

Image

Proposed Improvement

The created and distributed output of the package should allow separated imports, good tree shaking and smaller bundle sizes for the applications who are using this library. Including a Github action which verifies this behavior with a "playground" app which outputs only a small build when e.g. using just the mt-button.

Example:

Tree-shake bundle size: JS 4.86kb (limit 10kb), CSS 9.42kb (limit 12kb).

And it should fail when it exceeds specific limits

Metadata

Metadata

Assignees

Labels

component/administrationdomain/frameworkResponsible for the framework-level code includes core, administration, storefront, and frontends

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions