Element bundle: modules behind a barrel land in the first load

Open
#207 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript

Research direction

Start with the comment above SIZE_BUDGET_KIB in packages/pivotkit-element/build.js, then trace how pivotkit-core/src/index.js and echarts/renderers feed the lazy chunks. Compare the proposed subpath entries with a separate report chunk and check their effect on the first load. Done means the shared modules no longer land in the first load and the build budget gains headroom.

Written by the indexing model from the issue text.

Description

area:react enhancement idea

packages/pivotkit-element/build.js (comment above SIZE_BUDGET_KIB): a module reached through a barrel lands in the first load whenever any lazy chunk uses it. describeView through pivotkit-core/src/index.js puts describe.js (about 3.4 KiB raw) into the first load; echarts/renderers puts zrender's SVG painter (about 21 KiB raw) into the chart group. Not a bug, it costs budget headroom (#198).

Fix ideas: subpath entries without the barrel, or a separate build for the report chunk.

Dominant language
JavaScript
Stars
1
Forks
1
Avg merge
3h 21m
Merged PRs (30d)
250

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eizedev/pivotkit

All issues in eizedev/pivotkit

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.