From 9193e44c06bc8c2fcae55b07dd8e80853bdb3fef Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Sat, 4 May 2024 20:26:46 +1000 Subject: [PATCH] Add minify for vite build and exclude dist directory for built artifact --- .gitignore | 4 +++- .idea/react-ts-vite-starter-kit.iml | 1 + vite.config.ts | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 978459f..f647661 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,8 @@ .LSOverride # Icon must end with two \r -Icon +Icon + # Thumbnails ._* @@ -131,3 +132,4 @@ $RECYCLE.BIN/ # Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option) +dist/ \ No newline at end of file diff --git a/.idea/react-ts-vite-starter-kit.iml b/.idea/react-ts-vite-starter-kit.iml index 24643cc..d3f1fda 100644 --- a/.idea/react-ts-vite-starter-kit.iml +++ b/.idea/react-ts-vite-starter-kit.iml @@ -5,6 +5,7 @@ + diff --git a/vite.config.ts b/vite.config.ts index d77e281..29ba5fe 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,4 +5,7 @@ import react from '@vitejs/plugin-react'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react(), TanStackRouterVite()], + build: { + minify: 'esbuild', + }, });