diff --git a/vite.config.js b/vite.config.js index 03972ff..de0feee 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,19 +1,25 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; export default defineConfig({ plugins: [react()], css: { - postcss: './postcss.config.js', + postcss: "./postcss.config.js", }, build: { rollupOptions: { output: { manualChunks: { - 'react-vendor': ['react', 'react-dom'], - 'animation-vendor': ['three', 'styled-components', 'framer-motion'], - } - } - } - } -}) \ No newline at end of file + "react-vendor": ["react", "react-dom"], + "animation-vendor": ["three", "styled-components", "framer-motion"], + }, + assetFileNames: ({ name }) => { + if (name && name.match(/\.(png|jpe?g|svg|gif|webp)$/)) { + return "assets/images/[name][extname]"; + } + return "assets/[name]-[hash][extname]"; + }, + }, + }, + }, +}); \ No newline at end of file