File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import { loadKit } from '../utils/kit'
2323import { loadNuxtManifest , resolveNuxtManifest , writeNuxtManifest } from '../utils/nuxt'
2424
2525import { renderError } from './error'
26+ import { mkdir } from 'node:fs/promises'
2627
2728export type NuxtParentIPCMessage
2829 = | { type : 'nuxt:internal:dev:context' , context : NuxtDevContext }
@@ -334,7 +335,9 @@ export class NuxtDevServer extends EventEmitter<DevServerEventMap> {
334335 }
335336
336337 // Watch dist directory
337- this . _distWatcher = watch ( resolve ( this . _currentNuxt . options . buildDir , 'dist' ) )
338+ const distDir = resolve ( this . _currentNuxt . options . buildDir , 'dist' )
339+ await mkdir ( distDir , { recursive : true } )
340+ this . _distWatcher = watch ( distDir )
338341 this . _distWatcher . on ( 'change' , ( ) => {
339342 this . loadDebounced ( true , '.nuxt/dist directory has been removed' )
340343 } )
You can’t perform that action at this time.
0 commit comments