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 { useMaindataStore } from '@/stores/maindata.ts'
import { Torrent as QbitTorrent } from '@/types/qbit/models' import { Torrent as QbitTorrent } from '@/types/qbit/models'
import { Torrent } from '@/types/vuetorrent' import { Torrent } from '@/types/vuetorrent'
import { faker } from '@faker-js/faker' import { faker } from '@faker-js/faker/locale/en'
import { computed } from 'vue' import { computed } from 'vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'

View file

@ -22,12 +22,10 @@ export default defineConfig(({ command, mode }) => {
rollupOptions: { rollupOptions: {
output: { output: {
manualChunks: { manualChunks: {
// vue stuff apexcharts: ['apexcharts', 'vue3-apexcharts'],
vue: ['vue', 'vue-router', 'pinia', 'pinia-plugin-persist'], faker: ['@faker-js/faker'],
// vuetify stuff vue: ['vue', 'vue-router', 'vue-i18n', 'vue3-toastify', 'vuedraggable', 'pinia', 'pinia-plugin-persist'],
vuetify: ['vuetify'], vuetify: ['vuetify']
// faker stuff
faker: ['@faker-js/faker']
} }
} }
} }
@ -57,7 +55,7 @@ export default defineConfig(({ command, mode }) => {
base: './', base: './',
useCredentials: true, useCredentials: true,
workbox: { workbox: {
maximumFileSizeToCacheInBytes: 10000000, maximumFileSizeToCacheInBytes: 10_000_000,
skipWaiting: true, skipWaiting: true,
globPatterns: ['**/*.{js,css,html,ico,png,svg,woff,woff2}'] globPatterns: ['**/*.{js,css,html,ico,png,svg,woff,woff2}']
} }