Skip to content

feat(nuxt): add nitro:build:public-assets hook#19638

Merged
danielroe merged 5 commits into
mainfrom
feat/nitro-assets
Mar 14, 2023
Merged

feat(nuxt): add nitro:build:public-assets hook#19638
danielroe merged 5 commits into
mainfrom
feat/nitro-assets

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

resolves #14788

❓ 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)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This adds a new hook (nitro:build:assets) to allow interacting or adding new public assets after they have been copied into nitro.options.output.publicDir.

Thoughts welcome on hook name (cc: @pi0).

📝 Checklist

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

@danielroe danielroe added ✨ enhancement New feature or improvement to existing functionality 3.x nitro Nitro server engine integration 🍰 p2-nice-to-have Nice to have, not blocking labels Mar 13, 2023
@danielroe danielroe requested a review from pi0 March 13, 2023 10:55
@danielroe danielroe self-assigned this Mar 13, 2023
@codesandbox

codesandbox Bot commented Mar 13, 2023

Copy link
Copy Markdown

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

Comment thread docs/3.api/4.advanced/1.hooks.md Outdated

@pi0 pi0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 💯

@pi0

pi0 commented Mar 14, 2023

Copy link
Copy Markdown
Member

Should we call it nitro:build:public hook? 🤔 (it is public assets)

@danielroe

Copy link
Copy Markdown
Member Author

If you think that's clearer. Or maybe 'nitro:build:public-assets' if that's not too much of a mouthful?

@pi0

pi0 commented Mar 14, 2023

Copy link
Copy Markdown
Member

I like clarity of full name 👍🏼

@danielroe danielroe changed the title feat(nuxt): add nitro:build:assets hook after copying public assets feat(nuxt): add nitro:build:public-assets hook Mar 14, 2023
@danielroe danielroe merged commit 9d850a2 into main Mar 14, 2023
@danielroe danielroe deleted the feat/nitro-assets branch March 14, 2023 10:34
@danielroe danielroe mentioned this pull request Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x ✨ enhancement New feature or improvement to existing functionality nitro Nitro server engine integration 🍰 p2-nice-to-have Nice to have, not blocking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow modifying public assets after build (or in hook)

2 participants