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

fix: proper asset attribution #554

merged 9 commits into from Jan 25, 2019

fix: proper asset attribution #554

merged 9 commits into from Jan 25, 2019


Copy link

@tivac tivac commented Jan 25, 2019


Changes how assets are associated with bundle entries to split apart dynamic vs static. Also updates @modular-css/rollup-rewriter to only use the dynamic assets.

Motivation and Context

Assets being attached to the bundle object were being conflated, leading to over-inclusion when using @modular-css/rollup-rewriter. Now it only handles the dynamic assets and leaves static assets up to the consumer.

How Has This Been Tested?

Tests, and running against a large rollup project with tons of chunks.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)


  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
tivac added 8 commits Jan 24, 2019

Bundles will now have a `assets` and `dynamciAssets` array on them, and the metadata file will now contain an `assets` and `dynamicAssets` keys on them as well.
Then use that to create `assets` and `dynamicAssets` correctly.
Also updated snapshot and specimens
TODO: Totally breaks rewrite so I'll need to figure out what happened there later.
Copy link

@codecov codecov bot commented Jan 25, 2019

Codecov Report

Merging #554 into master will increase coverage by 0.09%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #554      +/-   ##
+ Coverage   98.94%   99.03%   +0.09%     
  Files          46       46              
  Lines        1041     1039       -2     
  Branches      160      163       +3     
- Hits         1030     1029       -1     
+ Misses         11       10       -1
Impacted Files Coverage Δ
packages/rollup/rollup.js 100% <100%> (+0.81%) ⬆️
packages/rollup-rewriter/rewriter.js 100% <100%> (ø) ⬆️

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 14b232b...dfe044d. Read the comment docs.


@tivac tivac merged commit 16fc758 into master Jan 25, 2019
4 checks passed
@tivac tivac deleted the dynamic-vs-static branch Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant