title: Vite: how to specify the folders need to be watched
body: <p>I am using <a href="https://vitejs.dev/" rel="nofollow noreferrer">Vite</a> in my SSR Nuxt project by <a href="https://vite.nuxtjs.org/" rel="nofollow noreferrer">nuxt-vite</a></p>
  <p>But the folder structure of my Nuxt project is not a default one but a custom one like this:</p>
  <p><a href="https://i.stack.imgur.com/F5Zv0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F5Zv0.png" alt="enter image description here" /></a></p>
  <p>the Nuxt project is inside of a Laravel project (I referenced this <a href="https://github.com/cretueusebiu/laravel-nuxt" rel="nofollow noreferrer">project</a>)</p>
  <p>Once I run <code>npm run dev</code> with <code>vite: {ssr: true}</code>, because the <code>package.json</code> is located at the root dir but the Nuxt project is not, <code>Vite</code> will watch all the changes in the folders under root dir.</p>
  <hr />
  <p>I try to specify the folders that Vite need to watch</p>
  <p>accroding to the <a href="https://vitejs.dev/config/#build-watch" rel="nofollow noreferrer">vite-document</a> and <a href="https://rollupjs.org/guide/en/#watchinclude" rel="nofollow noreferrer">rollupjs document</a></p>
  <p>my <code>nuxt.config.js</code> is</p>
  <pre class="lang-js prettyprint-override"><code>vite: {
    ssr: true,
    build: {
      watch: {
        include: 'client/**',
        // or this
        exclude: [
          '.git',
          '.nuxt',
          'app',
          'bootstrap',
          'config',
          'database',
          'node_modules',
          'public',
          'resources',
          'routes',
          'storage',
          'tests',
          'vendor'
        ]
      }
    }
  },
  </code></pre>
  <p>but the error is as same as it before: the <code>Vite</code> still watch all the folders under root dir</p>
  <p><a href="https://i.stack.imgur.com/OhE1w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OhE1w.png" alt="enter image description here" /></a></p>
  <hr />
  <p>How can I config the <code>Vite</code> so the folders can be watched correctly?</p>