#Add custom files to watch for restarting nuxt (just like `nuxt.config.ts`)

5 messages · Page 1 of 1 (latest)

tacit coral
#

Hi, in my nuxt.config.ts, I am importing some typescript files. When changing the nuxt.config.ts file, or e.g. the .env file of a project, nuxt gets restarted. I want to archive the same, so that when I edit one of the files imported, nuxt should also restart:

import { generateSitemap } from './generateSitemap'
import { cookieConfig } from './cookieConfig'

export default defineNuxtConfig({
  // ...
})

so in this case if either generateSitemap.ts or cookieConfig is edited, I want to restart the whole nuxt server.

fair dove
#

did you find a solution ?

tacit coral
#

it’s not yet released though

gray meadow