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

invalidateTemplates utility #12857

Closed
pi0 opened this issue Nov 29, 2021 · 0 comments · Fixed by nuxt/framework#8413
Closed

invalidateTemplates utility #12857

pi0 opened this issue Nov 29, 2021 · 0 comments · Fixed by nuxt/framework#8413

Comments

@pi0
Copy link
Member

pi0 commented Nov 29, 2021

Context: https://github.com/nuxt/framework/pull/2171/files#r758313330

Add a shortcut to trigger Nuxt builder rebuilding templates.

For Nuxt 3, builder:generateApp should be called.

For bridge compatibility, we can call generateRoutesAndFiles directly.

In the future, we might find better chance for selective template invalidation that needs fine control over vfs plugins for cache support.

Naming

I thought would be safer if we don't include "generate" and "app" since even tough technically we use this stage, it might not be always the case in the future nor clear for users of purpose.

However since this util is active (immediately regenerates) maybe we should call it generateTemplates() or updateTemplates() ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants