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(rollup-rewriter): include static dependencies #577

Merged
merged 4 commits into from
Apr 3, 2019

Conversation

tivac
Copy link
Owner

@tivac tivac commented Apr 2, 2019

Description

At dayjob ™️ a coworker ran into an issue where a dynamically loaded chunk that was being rewritten to include its CSS deps some of those deps were missing. Turns out that @modular-css/rollup-rewriter didn't include the CSS required by any static imports contained within the dynamic import chunk entry point.

So now it does.

Motivation and Context

Dynamic chunk entrypoints that have static dependencies that include CSS should be properly loaded.

How Has This Been Tested?

Added specimens & a test. Verified it failed before this change, then passes afterwards.

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)

Checklist:

  • 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.

It's not including dependencies of any static imports for the dynamic modules being found, which means that depending on your flow you can end up with incomplete styling.
So every CSS file is included before the dynamic chunk is loaded
Doesn't change functionality, which is still accurate
@codecov
Copy link

codecov bot commented Apr 2, 2019

Codecov Report

Merging #577 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #577   +/-   ##
=======================================
  Coverage   98.89%   98.89%           
=======================================
  Files          47       47           
  Lines        1178     1178           
  Branches      183      183           
=======================================
  Hits         1165     1165           
  Misses         13       13
Impacted Files Coverage Δ
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 ec746a9...b5290de. Read the comment docs.

@codecov
Copy link

codecov bot commented Apr 2, 2019

Codecov Report

Merging #577 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #577   +/-   ##
=======================================
  Coverage   98.89%   98.89%           
=======================================
  Files          47       47           
  Lines        1178     1178           
  Branches      183      183           
=======================================
  Hits         1165     1165           
  Misses         13       13
Impacted Files Coverage Δ
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 ec746a9...bf72854. Read the comment docs.

@TravisBuddy
Copy link

Hey @tivac,
Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: c4d7a230-55d2-11e9-bc42-792bcead230c

@tivac tivac merged commit ca499c6 into master Apr 3, 2019
@tivac tivac deleted the rewriter-dependencies branch April 3, 2019 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants