Sponsors
来源:Nuxt.js
浏览 406
扫码
分享
2020-08-19 22:51:03
The Generator Class
Hooks
Hook | Arguments | When |
---|
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 |