⚠️ You are looking at the english version of the page. Help us translate it here.
Want to take a look at our new docs? Our new docs are now in beta. Have fun!

The Generator Class


generate:before(generator, generateOptions)Hook on before generation
generate:cache:ignore(ignore)Hook to add ignore pattern, see generate.cache.ignore option
generate:distRemoved(generator)Hook on destination folder cleaned
generate:distCopied(generator)Hook on copy static and built files
generate:route({ route, setPayload })Hook before generating the page, useful for dynamic payload, see #7422, available for Nuxt 2.13+
generate:page({ route, path, html, errors, page })Hook to let user update the path & html after generation
generate:routeCreated({ route, path, errors })Hook on saving generated page success
generate:extendRoutes(routes)Hook to let user update the routes to generate
generate:routeFailed({ route, errors })Hook on saving generated page failure
generate:done(generator, errors)Hook on generation finished


Contribution for this page is now closed. If you would like to contribute please check out our new docs are now in beta. Have fun!

Platinum Sponsors

StoryblokMoovweb Support Us