This repo is to help reproduce the behaviour about use hooks in nuxt.config.ts
thats is overwriting Nitro presets hooks.
This happens with any
preset
that uses thecompiled
hook or another hook that also is configured innuxt.config.ts
. In this repo we will use theazure-function
preset
andcompiled
hook as example.
yarn install
- Run
yarn build
- See that in
.output/server
there is afunction.json
file that is created by thecompiled
hook fromazure-function
preset.
- Uncomment this code in
nuxt.config.ts
:
hooks: {
compiled: () => {
console.log('\n\n\n ######## My hook in nuxt.config.ts ######## \n\n\n')
}
}
- Run
yarn build
- See that in
.output/server
there is not afunction.json
file that should be created by thecompiled
hook fromazure-function
preset.