From 951462219ba9a382eb3c22111f4846945220b2c6 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Sat, 6 Jul 2024 14:32:51 +0900 Subject: [PATCH] chore: tweak external to improve startup --- vite.config.mts | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/vite.config.mts b/vite.config.mts index b86c79fce..7dd668a5f 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -2,5 +2,27 @@ import next from 'next/vite'; import { defineConfig } from 'vite'; export default defineConfig({ - plugins: [next()], + plugins: [ + next({ + plugins: [ + { + name: 'config', + apply: 'serve', + config() { + return { + ssr: { + optimizeDeps: { + include: [ + '@heroicons/react/24/outline', + '@heroicons/react/24/solid', + ], + }, + external: ['date-fns', 'dinero.js'], + }, + }; + }, + }, + ], + }), + ], });