Builder Class

Tapable plugins

We can register hooks on certain life cycle events.

nuxt.plugin('build', builder => {
    builder.plugin('extendRoutes', async ({routes}) =>  {
        // ...
Plugin Arguments When
build builder First build started
built builder First build finished
extendRoutes {routes, templateVars, r} Generating routes
generate {builder, templatesFiles, templateVars} Generating .nuxt template files
done {builder, stats} webpack build was done
compile {builder, compiler} Before webpack compile (compiler is a MultiCompiler instance)
compiled builder webpack build finished

Caught a mistake or want to contribute to the documentation? Edit this page on GitHub!