mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(kit): don't unsubscribe from file writing
This commit is contained in:
parent
3159bb4f65
commit
716a5b8341
@ -232,11 +232,9 @@ export async function writeTypes (nuxt: Nuxt) {
|
|||||||
// This is needed for Nuxt 2 which clears the build directory again before building
|
// This is needed for Nuxt 2 which clears the build directory again before building
|
||||||
// https://github.com/nuxt/nuxt/blob/2.x/packages/builder/src/builder.js#L144
|
// https://github.com/nuxt/nuxt/blob/2.x/packages/builder/src/builder.js#L144
|
||||||
// @ts-expect-error TODO: Nuxt 2 hook
|
// @ts-expect-error TODO: Nuxt 2 hook
|
||||||
const unsub = nuxt.hook('builder:prepared', writeFile)
|
nuxt.hook('builder:prepared', writeFile)
|
||||||
|
|
||||||
await writeFile()
|
await writeFile()
|
||||||
|
|
||||||
unsub()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderAttrs (obj: Record<string, string>) {
|
function renderAttrs (obj: Record<string, string>) {
|
||||||
|
Loading…
Reference in New Issue
Block a user