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

Add chunk CSS dependency metadata option #542

Merged
merged 3 commits into from
Jan 18, 2019
Merged

Add chunk CSS dependency metadata option #542

merged 3 commits into from
Jan 18, 2019

Conversation

tivac
Copy link
Owner

@tivac tivac commented Jan 18, 2019

Description

Adds a new option, meta, to the rollup plugin that will trigger it to write out a JSON file containing metadata about each JS chunk. Currently it only writes out CSS dependencies, but someday it might do more.

Motivation and Context

Fixes #540

How Has This Been Tested?

Added a test

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.

BREAKING CHANGE:

The previous release would stick all unreferenced CSS at the beginning of the first bundle. This was a mistake, and has been rectified.
Outputs a JSON file containing the CSS dependencies for each JS entry point.
@tivac
Copy link
Owner Author

tivac commented Jan 18, 2019

Also note the BREAKING CHANGE to bring back common.css in cases where there is CSS that isn't referenced by any JS chunk. Not sure why I thought getting rid of that was a good idea but... I was wrong.

@codecov
Copy link

codecov bot commented Jan 18, 2019

Codecov Report

Merging #542 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #542      +/-   ##
==========================================
+ Coverage   99.16%   99.17%   +<.01%     
==========================================
  Files          41       41              
  Lines         962      970       +8     
  Branches      148      149       +1     
==========================================
+ Hits          954      962       +8     
  Misses          8        8
Impacted Files Coverage Δ
packages/rollup/rollup.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 b8dce99...9df9598. Read the comment docs.

@tivac tivac merged commit e42e997 into master Jan 18, 2019
@tivac tivac deleted the dependency-metadata branch January 18, 2019 16:08
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.

Export JS chunk -> CSS chunk dependency information
1 participant