Skip to content

fix(vite): resolve lazying loading error in dist build #6436

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

Merged
merged 2 commits into from
Feb 8, 2023

Conversation

benelan
Copy link
Member

@benelan benelan commented Feb 8, 2023

Related Issue: #6419

Summary

Resolves errors that occurs when lazy loading the components in Vite using the dist build.

https://stenciljs.com/docs/config-extras#experimentalimportinjection

MicrosoftTeams-image (1)

The doc linked above mentions an increase in bundle size, here is the before and after using my build-sizes npm package.

Before

-----------------------------
|> Application Build Sizes <|
-----------------------------
Build
 --> file count: 9178
 --> size: 12.07 MB
 --> size on disk: 13.75 MB
-----------------------------
Main JS bundle
 --> name: calcite-color-picker_3.cjs.entry.js
 --> size: 100.12 KB
 --> gzip size: 24.33 KB
 --> brotli size: 21.01 KB
-----------------------------

After

-----------------------------
|> Application Build Sizes <|
-----------------------------
Build
 --> file count: 9316
 --> size: 12.35 MB
 --> size on disk: 14.49 MB
-----------------------------
Main JS bundle
 --> name: calcite-color-picker_3.cjs.entry.js
 --> size: 100.12 KB
 --> gzip size: 24.33 KB
 --> brotli size: 21.01 KB
-----------------------------

@benelan benelan requested a review from a team as a code owner February 8, 2023 02:09
@github-actions github-actions bot added the bug Bug reports for broken functionality. Issues should include a reproduction of the bug. label Feb 8, 2023
Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨⚙️✨

@benelan benelan added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Feb 8, 2023
@benelan benelan merged commit f99ffa7 into master Feb 8, 2023
@benelan benelan deleted the benelan/vite-dist branch February 8, 2023 02:40
benelan added a commit that referenced this pull request Feb 8, 2023
…c-rulez

* origin/master:
  docs: update component READMEs (#6352)
  ci(next): fix commit message (#6425)
  fix(vite): resolve lazying loading error in dist build (#6436)
  docs(changelog): remove reverted feature (#6435)
  revert: "feat(pagination, split-button, dropdown, date-picker) action-group): add setFocus method (#6405)" (#6426)
  1.1.0-next.2
  docs(segmented-control): update event description for calciteSegmentedControlChange (#6428)
  fix(tree-item): reverses regression to bring back focus when navigating with keyboard (#6424)
  fix(icon): fix icon normalization to handle x-times-named icons (#6422)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports for broken functionality. Issues should include a reproduction of the bug. pr ready for visual snapshots Adding this label will run visual snapshot testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants