Skip to content

Commit

Permalink
chore(deps): added vite-optimize-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Oct 19, 2021
1 parent a575c50 commit 0db5a34
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 22 deletions.
25 changes: 25 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,32 @@
"typescript": "4.4.3",
"unplugin-vue-components": "0.15.6",
"vite": "2.6.10",
"vite-plugin-optimize-persist": "^0.1.0",
"vite-plugin-package-config": "^0.0.3",
"vue-i18n-extract": "^2.0.4",
"vue-tsc": "0.28.7"
},
"vite": {
"optimizeDeps": {
"include": [
"@headlessui/vue",
"@vue/reactivity",
"@vueuse/head",
"@vueuse/motion",
"axios",
"date-fns",
"date-fns/locale",
"dropbox",
"keyboardjs",
"mitt",
"pdfmake/build/pdfmake",
"vue",
"vue-final-modal",
"vue-i18n",
"vue-router",
"vue-toastification",
"vuex"
]
}
}
}
2 changes: 1 addition & 1 deletion src/use/pdf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ export const usePDF = () => {
if (store.state.pdf.normalize['Roboto'])
set['Roboto'] = store.state.pdf.normalize['Roboto']

// @ts-ignore
// @ts-ignore
;(<any>pdfMake).fonts = set
}

Expand Down
27 changes: 6 additions & 21 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import vue from "@vitejs/plugin-vue";
import Components from "unplugin-vue-components/vite";
import { HeadlessUiResolver } from "unplugin-vue-components/resolvers";
import vueI18n from "@intlify/vite-plugin-vue-i18n";
import vitePersist from 'vite-plugin-optimize-persist'
import vitePackageConfig from 'vite-plugin-package-config'


export default defineConfig({
plugins: [
Expand All @@ -15,7 +18,9 @@ export default defineConfig({
Components({
dts: true,
resolvers: [HeadlessUiResolver()],
})
}),
vitePersist(),
vitePackageConfig()
],

resolve: {
Expand All @@ -32,24 +37,4 @@ export default defineConfig({
overlay: false
}
},

optimizeDeps: {
include: [
'vue',
'vue-router',
'vuex',
'vue-i18n',
'vue-final-modal',
'vue-toastification',
'@vueuse/core',
'@headlessui/vue',
'pdfmake'
],
exclude: [
'vue-demi',
'@vue/reactivity',
'@vueuse/motion',
'@vuseuse/head'
],
},
});
15 changes: 15 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6286,6 +6286,21 @@ validate-npm-package-license@^3.0.1:
spdx-correct "^3.0.0"
spdx-expression-parse "^3.0.0"

vite-plugin-optimize-persist@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/vite-plugin-optimize-persist/-/vite-plugin-optimize-persist-0.1.0.tgz#d4b18e36e9669f47d2a7c24ec438ef2820ab2589"
integrity sha512-9pVjHUDJCPq7H1OiaQU8olejOoh8Caf+YVEqaaPcIBRJ/ENym1DdQQD/RCc3GzxVkCTlUwVIihpLkg98am9sEQ==
dependencies:
debug "^4.3.2"
fs-extra "^10.0.0"

vite-plugin-package-config@^0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/vite-plugin-package-config/-/vite-plugin-package-config-0.0.3.tgz#8667dbffffd3eafa0f697c386659d653f737b887"
integrity sha512-xneYdCd9fqmehemphnfyHJDE/IyiXe2rtg39lNcQq9jaA5oZCIBBTG+lLAaal3zIyABjKd7fp9oHG/Y+sq5Xlw==
dependencies:
debug "^4.3.2"

vite@2.6.10:
version "2.6.10"
resolved "https://registry.yarnpkg.com/vite/-/vite-2.6.10.tgz#7a4f420c6e2c7d9062c7f9ce4578a817c72b3842"
Expand Down

0 comments on commit 0db5a34

Please sign in to comment.