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: call rollup:before before generating rollup config #335

Merged
merged 1 commit into from
Jul 12, 2022

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

nuxt/content#1346 (comment)

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Likely in rollup:before users might want to modify nitro options with effect of changing rollup config. For example:

https://github.com/nuxt/framework/blob/f321a56e63be508e5f478b1de5227a5add2b977f/packages/nuxt/src/core/nitro.ts#L124-L134

This makes that possible.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

await nitro.hooks.callHook('rollup:before', nitro)
const rollupConfig = getRollupConfig(nitro)
Copy link
Member

Choose a reason for hiding this comment

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

I think put hook before to allow extending resolved config but not possible. We can use new hook for that :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense πŸ‘

@pi0 pi0 merged commit 292b495 into main Jul 12, 2022
@pi0 pi0 deleted the fix/rollup-config-hook branch July 12, 2022 17:21
pi0 added a commit that referenced this pull request Jul 12, 2022
This opens an unseen bug in nuxt < rc.4. including in a later semver-major version
WinterYukky pushed a commit to WinterYukky/nitro that referenced this pull request Nov 1, 2022
WinterYukky pushed a commit to WinterYukky/nitro that referenced this pull request Nov 1, 2022
This opens an unseen bug in nuxt < rc.4. including in a later semver-major version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants