From db3b0b06e4430c4dc9fe52759bcde7f52e83b551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Marseault?= <22910497+Larsluph@users.noreply.github.com> Date: Thu, 9 Nov 2023 04:26:41 +0100 Subject: [PATCH] chore(vite): Improve chunk size (#1283) --- src/composables/TorrentBuilder.ts | 2 +- vite.config.ts | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/composables/TorrentBuilder.ts b/src/composables/TorrentBuilder.ts index a16107cf..e3c3e382 100644 --- a/src/composables/TorrentBuilder.ts +++ b/src/composables/TorrentBuilder.ts @@ -3,7 +3,7 @@ import { formatEta, getDomainBody } from '@/helpers' import { useMaindataStore } from '@/stores/maindata.ts' import { Torrent as QbitTorrent } from '@/types/qbit/models' import { Torrent } from '@/types/vuetorrent' -import { faker } from '@faker-js/faker' +import { faker } from '@faker-js/faker/locale/en' import { computed } from 'vue' import { useI18n } from 'vue-i18n' diff --git a/vite.config.ts b/vite.config.ts index 287371c2..03dfde5c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -22,12 +22,10 @@ export default defineConfig(({ command, mode }) => { rollupOptions: { output: { manualChunks: { - // vue stuff - vue: ['vue', 'vue-router', 'pinia', 'pinia-plugin-persist'], - // vuetify stuff - vuetify: ['vuetify'], - // faker stuff - faker: ['@faker-js/faker'] + apexcharts: ['apexcharts', 'vue3-apexcharts'], + faker: ['@faker-js/faker'], + vue: ['vue', 'vue-router', 'vue-i18n', 'vue3-toastify', 'vuedraggable', 'pinia', 'pinia-plugin-persist'], + vuetify: ['vuetify'] } } } @@ -57,7 +55,7 @@ export default defineConfig(({ command, mode }) => { base: './', useCredentials: true, workbox: { - maximumFileSizeToCacheInBytes: 10000000, + maximumFileSizeToCacheInBytes: 10_000_000, skipWaiting: true, globPatterns: ['**/*.{js,css,html,ico,png,svg,woff,woff2}'] }