From e12aee88b1b56c0343725e82462dd21656ffb64b Mon Sep 17 00:00:00 2001 From: Seungwoo Jung Date: Wed, 27 Nov 2024 16:55:57 +0900 Subject: [PATCH] change vite config and index.html for relative path --- index.html | 7 ------- vite.config.ts | 19 ++++++------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/index.html b/index.html index 74b5661..24b987c 100644 --- a/index.html +++ b/index.html @@ -8,12 +8,5 @@
- diff --git a/vite.config.ts b/vite.config.ts index 01984be..5076816 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,25 +5,18 @@ import path from 'path' export default defineConfig({ plugins: [react()], base: '/yurim_fe_portfolio/', - server: { - port: 3000, - open: true, - }, - preview: { - port: 3000, - open: true, - }, - resolve: { - alias: { - '@': path.resolve(__dirname, './src') - } - }, build: { outDir: 'dist', sourcemap: true, + assetsDir: 'assets', rollupOptions: { input: { main: path.resolve(__dirname, 'index.html') + }, + output: { + assetFileNames: 'assets/[name].[hash][extname]', + chunkFileNames: 'assets/[name].[hash].js', + entryFileNames: 'assets/[name].[hash].js' } } }