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(run): use correct hook for reading options, handle facade chunks #292

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

TrySound
Copy link
Member

Rollup Plugin Name: run

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

If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers:

Description

Ref #241 (comment)

  • take input from latest options when build is started
  • check facade id instead of modules list

Ref #241 (comment)

- take input from latest options when build is started
- check facade id instead of modules list
@shellscape
Copy link
Collaborator

@TrySound can you elaborate on what the PR does? It's not clear from the PR title. This is important for the changelog.

@TrySound
Copy link
Member Author

TrySound commented Apr 1, 2020

Here quotes of Lukas response from linked PR

The first case

Also note that if a plugin just wants to read options, it should NOT use the options hook because other plugins can still mutate options at that point. If you just want to read, always use buildStart which receives the final options used by Rollup.

The second case

The point is that when Rollup cannot match the export signature of an entry chunk because it needs to add additional exports, it will create a facade chunk that reexports exactly those exports that the original entry point exposed. A facade chunk will have its chunk.modules empty because it does not contain the code of any module, it just contains reexports.

@shellscape shellscape changed the title fix(run): cover missing cases fix(run): use correct hook for reading options, handle facade chunks Apr 1, 2020
@shellscape shellscape merged commit d7259f6 into master Apr 1, 2020
@shellscape shellscape deleted the run_missing_cases branch April 1, 2020 12:34
shellscape pushed a commit that referenced this pull request Apr 1, 2020
…292)

Ref #241 (comment)

- take input from latest options when build is started
- check facade id instead of modules list
LarsDenBakker pushed a commit to LarsDenBakker/plugins that referenced this pull request Sep 12, 2020
…ollup#292)

Ref rollup#241 (comment)

- take input from latest options when build is started
- check facade id instead of modules list
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.

2 participants