Page traduite Le contenu de cette page peut être déprécié.
La classe Generator
La classe Generator de Nuxt
- Source: generator/generator.js
Hooks
generate:
hooks:
Hook | Arguments | Quand |
---|---|---|
generate:before |
(generator, generateOptions) | Hook avant la génération de la page |
generate:distRemoved |
(generator) | Hook sur le répertoire de destination nettoyé |
generate:distCopied |
(generator) | Hook sur la copie des fichiers statiques et du build |
generate:route |
({ route, setPayload }) | Hook avant de générer la page, utile pour la charge utile dynamique, voir #7422 , disponible pour Nuxt 2.13+ |
generate:page |
({ route, path, html }) | Hook pour permettre à l'utilisateur de mettre à jour le chemin et l'html après la génération |
generate:routeCreated |
({ route, path, errors }) | Hook sur la sauvegarde du succès des pages générées |
generate:extendRoutes |
(routes) | Hook pour permettre à l'utilisateur de mettre à jour les routes à générer |
generate:routeFailed |
({ route, errors }) | Hook sur l'enregistrement de l'échec de la page générée |
generate:done |
(generator, errors) | Hook sur la génération terminée |
Editer cette page sur GitHub
Mise à jour le jeu. 9 février 2023

























































