⚠️ You are looking at the english version of the page. Help us translate it here.

API: The Nuxt Class

This is the core container which allows all modules and classes communicate with each other. All modules have access to Nuxt instance using this.nuxt.


We can register hooks on certain life cycle events.

nuxt.hook('ready', async (nuxt) => {
  // Your custom code here
Plugin Arguments When
ready (nuxt) Nuxt is ready to work (ModuleContainer and Renderer ready).
error (error) An unhandled error when calling hooks.
close (nuxt) Nuxt instance is gracefully closing.
listen (server, {host, port}) Nuxt internal server starts listening. (Using nuxt start or nuxt dev).

잘못된 부분이 있거나 이 문서에 기여하고 싶으신가요? GitHub에서 이 페이지를 수정해주세요!

Platinum Sponsors

Storyblok Support Us