title: How do I make Vite build my files every time a change is made?
body: <p>I'm trying to make Vite build my files and output them into the <code>dist</code> folder every time I save/make changes on to my files during development.</p>
  <p>How would I do that?</p>
  <p>Here is my <code>vite.config.development.js</code> file:</p>
  <pre><code>import { defineConfig } from &quot;vite&quot;;
  export default defineConfig({
      base: &quot;./&quot;,
      build: {
          rollupOptions: {
              output: {
                  assetFileNames: &quot;assets/[name].[ext]&quot;,
                  chunkFileNames: &quot;assets/[name].[ext]&quot;,
                  entryFileNames: &quot;assets/[name].js&quot;,
              },
          },
          write: true,
      },
  });
  </code></pre>
  <p>Here is my scripts in <code>package.json</code>:</p>
  <pre><code>&quot;frontend-dev&quot;: &quot;vite --config vite.config.development.js&quot;,
  </code></pre>
  <p>It does the usual <code>localhost:3000</code> thing, but it does not build my files and put them in the <code>dist</code> folder when I make changes to my source code.</p>
  <p>Currently, I have to run a <code>vite build</code> npm script every time which takes a lot of time.</p>