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

Extracting shared resources out to a bootstrap file #95

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rorticus
Copy link
Contributor

@rorticus rorticus commented May 1, 2020

Currently, each custom element bundle contains a copy of the vdom. This is inefficient and bloats the bundle size.

This PR extracts anything used more than twice from node_modules into a common bootstrap chunk. This bootstrap chunk will contain the dojo framework and other modules shared between your elements and will only need to be loaded once.

What this means is:

  • If you build more than one element, a bootstrap js file will be generated. You'll need to load this file in addition to your element file.
  • If you only build one element, no bootstrap file will be generated.

Note: This is a breaking change, as it modifies the generated chunks

@codecov
Copy link

codecov bot commented May 1, 2020

Codecov Report

Merging #95 (578e0f4) into master (3c588a2) will decrease coverage by 0.11%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #95      +/-   ##
==========================================
- Coverage   57.00%   56.88%   -0.12%     
==========================================
  Files           9        9              
  Lines         500      501       +1     
  Branches      122      122              
==========================================
  Hits          285      285              
- Misses        215      216       +1     
Impacted Files Coverage Δ
src/base.config.ts 19.01% <0.00%> (-0.14%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3c588a2...578e0f4. Read the comment docs.

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

Successfully merging this pull request may close these issues.

1 participant