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 referenced files to bundle #3661

Merged
merged 2 commits into from Jul 6, 2020
Merged

Add referenced files to bundle #3661

merged 2 commits into from Jul 6, 2020

Conversation

lukastaegert
Copy link
Member

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:
Resolves #3644

Description

This will add a referencedFiles property to chunks in generateBundle and to the bundle in the JavaScript API. It contains a list of all chunks and assets that are referenced in the given chunk via import.meta.ROLLUP_FILE_URL_<id>.

@rollup-bot
Copy link
Collaborator

rollup-bot commented Jul 5, 2020

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install rollup/rollup#chunk-file-references

or load it into the REPL:
https://rollupjs.org/repl/?circleci=12254

@codecov
Copy link

codecov bot commented Jul 5, 2020

Codecov Report

Merging #3661 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3661   +/-   ##
=======================================
  Coverage   96.70%   96.71%           
=======================================
  Files         183      183           
  Lines        6291     6299    +8     
  Branches     1833     1834    +1     
=======================================
+ Hits         6084     6092    +8     
  Misses        105      105           
  Partials      102      102           
Impacted Files Coverage Δ
src/Bundle.ts 100.00% <100.00%> (ø)
src/Chunk.ts 100.00% <100.00%> (ø)
src/ast/nodes/MetaProperty.ts 100.00% <100.00%> (ø)

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 19e50af...0ae1f35. Read the comment docs.

Copy link
Contributor

@jakearchibald jakearchibald left a comment

Choose a reason for hiding this comment

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

In terms of the developer-facing feature, LGTM!

@lukastaegert lukastaegert merged commit ed1bd33 into master Jul 6, 2020
@lukastaegert lukastaegert deleted the chunk-file-references branch July 6, 2020 19:05
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.

List file references in bundle object
3 participants