Skip to content

Commit e246d52

Browse files
committed
feat(bundle): manual chunk clients
1 parent 6c2ba7b commit e246d52

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

vite.config.ts

+5
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ export default defineConfig(() => ({
143143
rollupOptions: {
144144
input: getInput(isDev, isWeb),
145145
output: {
146+
manualChunks: id => {
147+
if (id.includes('/services/tmdb') || id.includes('/models/tmdb')) return 'tmdb-client';
148+
if (id.includes('/services/trakt') || id.includes('/models/trakt')) return 'trakt-client';
149+
if (id.includes('/services/tvdb') || id.includes('/models/tvdb')) return 'tvdb-client';
150+
},
146151
minifyInternalExports: false,
147152
chunkFileNames: 'chunks/[name]-[hash].chunk.js',
148153
entryFileNames: entry => {

0 commit comments

Comments
 (0)