Zet - How do you get vite to not add a hash to the build artefacts it creates?

How do you get vite to not add a hash to the build artefacts it creates?

Vite uses rollup to bundle. You can change the output in the rollupOptions like this:

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [vue()],
    build: {
        // So we don't end up with lots of build artifacts uploaded to static assets
        // override vite's default build output paths and remove the hash
        rollupOptions: {
            output: {
              entryFileNames: `assets/[name].js`,
              chunkFileNames: `assets/[name].js`,
              assetFileNames: `assets/[name].[ext]`
            }
          }
    }
});

#vite #rollup