chore(vite): Improve chunk size (#1283)

This commit is contained in:
Rémi Marseault 2023-11-09 04:26:41 +01:00 committed by GitHub
parent 9576182093
commit db3b0b06e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View file

@ -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'

View file

@ -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}']
}