Quiz_dashboard/vite.config.mjs
2024-09-30 16:20:58 +03:00

28 lines
631 B
JavaScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { visualizer } from "rollup-plugin-visualizer";
export default defineConfig(() => {
return {
build: {
outDir: "build",
rollupOptions: {
output: {
entryFileNames: '[name].[hash].js',
chunkFileNames: '[name].[hash].js',
assetFileNames: '[name].[hash][extname]',
},
},
},
plugins: [
react(),
visualizer({
filename: "./bundle-analysis.html", // Output file
open: true, // Open the generated file automatically
}),
],
};
});