From 4f0a01301479b6b03d9081bb9bc2b90a9d1769ab Mon Sep 17 00:00:00 2001 From: Vasilii Mikhailovskii Date: Mon, 2 Dec 2024 18:28:14 +0200 Subject: [PATCH] optimize chunks --- apps/frontend/vite.config.ts | 7 +++++++ package.json | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/frontend/vite.config.ts b/apps/frontend/vite.config.ts index e27d1a9..911478b 100644 --- a/apps/frontend/vite.config.ts +++ b/apps/frontend/vite.config.ts @@ -77,6 +77,13 @@ export default defineConfig(({ mode }) => { return 'vendor' } + if (id.includes('src/api/')) { + return 'api' + } + if (id.includes('src/utils/')) { + return 'utils' + } + // По умолчанию ничего не делим return null }, diff --git a/package.json b/package.json index b39708c..5b9007d 100644 --- a/package.json +++ b/package.json @@ -19,5 +19,6 @@ "build": "npm run build --workspaces", "test": "npm run test --workspaces", "lint": "npm run lint --workspaces" - } + }, + "packageManager": "pnpm@8.15.9" }