From 5fa03923e9f7f60dc8550f44151dd51b6933493f Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 25 Jul 2021 16:02:49 +0200 Subject: [PATCH] Improve chunk size --- .gitignore | 1 + package.json | 2 +- src/components/tasks/mixins/taskList.js | 2 +- src/store/modules/kanban.js | 2 +- vite.config.js | 4 ++++ yarn.lock | 20 +++++++++++++++++++- 6 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index b0700e38..3ae9059a 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ node_modules npm-debug.log* yarn-debug.log* yarn-error.log* +stats.html # Editor directories and files .idea diff --git a/package.json b/package.json index 4440638d..b27eaa19 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,6 @@ "serve:dist-dev": "node scripts/serve-dist.js", "build": "vite build && rollup -c ./rollup.sw.js && workbox copyLibraries dist/", "build:dev": "vite build -m development --outDir dist-dev/", - "build:report": "vue-cli-service build --report", "lint": "vue-cli-service lint --ignore-pattern '*.test.*'", "cypress:open": "cypress open", "test:unit": "jest", @@ -65,6 +64,7 @@ "faker": "5.5.3", "jest": "27.0.6", "rollup-plugin-terser": "^7.0.2", + "rollup-plugin-visualizer": "^5.5.2", "sass": "1.36.0", "sass-loader": "10.2.0", "ts-jest": "27.0.4", diff --git a/src/components/tasks/mixins/taskList.js b/src/components/tasks/mixins/taskList.js index 963e6919..2a257691 100644 --- a/src/components/tasks/mixins/taskList.js +++ b/src/components/tasks/mixins/taskList.js @@ -1,5 +1,5 @@ import TaskCollectionService from '../../../services/taskCollection' -import {cloneDeep} from 'lodash' +import cloneDeep from 'lodash/cloneDeep' /** * This mixin provides a base set of methods and properties to get tasks on a list. diff --git a/src/store/modules/kanban.js b/src/store/modules/kanban.js index 4f59449c..ba1007ad 100644 --- a/src/store/modules/kanban.js +++ b/src/store/modules/kanban.js @@ -1,5 +1,5 @@ import Vue from 'vue' -import {cloneDeep} from 'lodash' +import cloneDeep from 'lodash/cloneDeep' import BucketService from '../../services/bucket' import {filterObject} from '@/helpers/filterObject' diff --git a/vite.config.js b/vite.config.js index 09facf65..041539a0 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,6 +1,7 @@ const {createVuePlugin} = require('vite-plugin-vue2') const {VitePWA} = require('vite-plugin-pwa') const path = require('path') +const {visualizer} = require('rollup-plugin-visualizer') module.exports = { plugins: [ @@ -82,6 +83,9 @@ module.exports = { build: { target: 'es2015', rollupOptions: { + plugins:[ + visualizer(), + ], output: { manualChunks: { 'user-settings': [ diff --git a/yarn.lock b/yarn.lock index b7e748ed..720d060a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10098,7 +10098,7 @@ nanoid@^2.1.0: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280" integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== -nanoid@^3.1.23: +nanoid@^3.1.22, nanoid@^3.1.23: version "3.1.23" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81" integrity sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw== @@ -10507,6 +10507,14 @@ open@^6.3.0: dependencies: is-wsl "^1.1.0" +open@^7.4.2: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== + dependencies: + is-docker "^2.0.0" + is-wsl "^2.1.1" + opener@^1.5.1: version "1.5.2" resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" @@ -12110,6 +12118,16 @@ rollup-plugin-terser@^7.0.0, rollup-plugin-terser@^7.0.2: serialize-javascript "^4.0.0" terser "^5.0.0" +rollup-plugin-visualizer@^5.5.2: + version "5.5.2" + resolved "https://registry.yarnpkg.com/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.5.2.tgz#ae2130ee5ae4a2d901e764e492b71357cb95eed7" + integrity sha512-sh+P9KhuWTzeStyRA5yNZpoEFGuj5Ph34JLMa9+muhU8CneFf9L0XE4fmAwAojJLWp//uLUEyytBPSCdZEg5AA== + dependencies: + nanoid "^3.1.22" + open "^7.4.2" + source-map "^0.7.3" + yargs "^16.2.0" + rollup@^2.35.1, rollup@^2.38.5, rollup@^2.43.1: version "2.54.0" resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.54.0.tgz#99ea816e8e9b1c6af3ab957a4e7a8f78dbd87773"