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

Permit plugins to add assets directly to the bundle in Rollup 1.x #3105

Merged
merged 1 commit into from Sep 9, 2019

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 #3104

Description

Apparently some plugins heavily depend on the ability to directly add assets to the bundle object. This will permit this workflow again but add a deprecation message that will show when using strictDeprecations.

@codecov
Copy link

codecov bot commented Sep 9, 2019

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3105      +/-   ##
==========================================
+ Coverage   89.27%   89.28%   +<.01%     
==========================================
  Files         165      165              
  Lines        5726     5731       +5     
  Branches     1739     1740       +1     
==========================================
+ Hits         5112     5117       +5     
  Misses        380      380              
  Partials      234      234
Impacted Files Coverage Δ
src/rollup/index.ts 93.81% <100%> (+0.16%) ⬆️

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 1b72941...dc4d6f8. Read the comment docs.

@lukastaegert lukastaegert merged commit cb5227c into master Sep 9, 2019
@lukastaegert lukastaegert deleted the gh-3104-allow-bundle-mutation branch September 9, 2019 07:53
@jackturnbull
Copy link

Thanks for the fix here - was scratching my head why my little manifest plugin was returning undefined. I wasn't aware of this.emitAsset so I'm glad of that.

@lukastaegert
Copy link
Member Author

Actually the proper way is this.emitFile by now as this also allows to use arbitrary names if you need to :) https://rollupjs.org/guide/en/#thisemitfileemittedfile-emittedchunk--emittedasset--string

@lukastaegert
Copy link
Member Author

And that's what I should have written, damn. Maybe another day...

@hiendv
Copy link

hiendv commented Mar 25, 2020

Should we also print the plugin adding properties? As an end-user, it surely helps tracking down the cause of the warning.

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.21.0 includes a breaking change
3 participants