From 375a365fd3afc99955fb5240e76f1c3d4e13f2e8 Mon Sep 17 00:00:00 2001 From: Marcelo Wiebbelling Date: Mon, 17 Jun 2024 18:52:02 +0200 Subject: [PATCH] Moving from @invictus.codes/nuxt-vuetify to vite-plugin-vuetify --- nuxt.config.ts | 35 +++++++++-------- package.json | 6 ++- plugins/vuetify.js | 12 ++++++ yarn.lock | 96 ++++++++++------------------------------------ 4 files changed, 56 insertions(+), 93 deletions(-) create mode 100644 plugins/vuetify.js diff --git a/nuxt.config.ts b/nuxt.config.ts index a9a8d81..13ee2c3 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,5 +1,7 @@ // https://nuxt.com/docs/api/configuration/nuxt-config +import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify' + export default defineNuxtConfig({ app: { head: { @@ -52,24 +54,20 @@ export default defineNuxtConfig({ }, pageTransition: { name: 'page', mode: 'out-in' } }, + build: { + transpile: ['vuetify'], + }, modules: [ - '@invictus.codes/nuxt-vuetify', '@pinia/nuxt', '@pinia-plugin-persistedstate/nuxt', - '@nuxtjs/seo' - ], - extends: [ - 'nuxt-seo-kit' - ], - runtimeConfig: { - public: { - siteUrl: process.env.NUXT_PUBLIC_SITE_URL || 'https://rendafixa.github.io', - siteName: 'Calculadora Renda Fixa', - siteDescription: 'Calculadora de investimentos Renda Fixa para simulação de ' + - 'rentabilidade em CDB, RDB, LC, LCI, LCA, Poupança e Tesouro Direto', - language: 'pt' + '@nuxtjs/seo', + (_options, nuxt) => { + nuxt.hooks.hook('vite:extendConfig', (config) => { + // @ts-expect-error + config.plugins.push(vuetify({ autoImport: true })) + }) } - }, + ], devtools: { enabled: true }, piniaPersistedstate: { storage: 'localStorage' @@ -96,5 +94,12 @@ export default defineNuxtConfig({ description: 'Calculadora de investimentos Renda Fixa para simulação de ' + 'rentabilidade em CDB, RDB, LC, LCI, LCA, Poupança e Tesouro Direto', defaultLocale: 'pt' - } + }, + vite: { + vue: { + template: { + transformAssetUrls, + }, + }, + }, }) \ No newline at end of file diff --git a/package.json b/package.json index c38e052..115b028 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "test": "vitest" }, "devDependencies": { - "@invictus.codes/nuxt-vuetify": "^0.3.0", "@nuxt/devtools": "latest", "@nuxt/test-utils": "^3.7.1", "@nuxtjs/seo": "^2.0.0-rc.10", @@ -18,9 +17,12 @@ "@vitejs/plugin-vue": "^4.3.4", "jsdom": "^22.1.0", "nuxt": "^3.11.2", - "vitest": "^1.6.0" + "vite-plugin-vuetify": "^2.0.3", + "vitest": "^1.6.0", + "vuetify": "^3.6.9" }, "dependencies": { + "@mdi/font": "^7.4.47", "@pinia/nuxt": "^0.5.1" } } diff --git a/plugins/vuetify.js b/plugins/vuetify.js new file mode 100644 index 0000000..b568f12 --- /dev/null +++ b/plugins/vuetify.js @@ -0,0 +1,12 @@ +// import this after install `@mdi/font` package +import '@mdi/font/css/materialdesignicons.css' + +import 'vuetify/styles' +import { createVuetify } from 'vuetify' + +export default defineNuxtPlugin((app) => { + const vuetify = createVuetify({ + // ... your configuration + }) + app.vueApp.use(vuetify) +}) diff --git a/yarn.lock b/yarn.lock index dd8df54..32f0155 100644 --- a/yarn.lock +++ b/yarn.lock @@ -980,16 +980,6 @@ dependencies: "@iconify/types" "^2.0.0" -"@invictus.codes/nuxt-vuetify@^0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@invictus.codes/nuxt-vuetify/-/nuxt-vuetify-0.3.0.tgz#f473081a90464fff177cce99b3311b6a2bd414a9" - integrity sha512-Rc2fIzq4CFUlmUHudQBBjyy+yVTlZeevsqh4cuGqPcIdUNWYJRrWFHl5bsp/lfNS5iDYElSBxefWJOD4wFc4gA== - dependencies: - "@nuxt/kit" "^3.6.2" - defu "^6.1.2" - vite-plugin-vuetify "^1.0.2" - vuetify "^3.3.7" - "@ioredis/commands@^1.1.1": version "1.2.0" resolved "https://registry.yarnpkg.com/@ioredis/commands/-/commands-1.2.0.tgz#6d61b3097470af1fdbbe622795b8921d42018e11" @@ -1109,6 +1099,11 @@ semver "^7.3.5" tar "^6.1.11" +"@mdi/font@^7.4.47": + version "7.4.47" + resolved "https://registry.yarnpkg.com/@mdi/font/-/font-7.4.47.tgz#2ae522867da3a5c88b738d54b403eb91471903af" + integrity sha512-43MtGpd585SNzHZPcYowu/84Vz2a2g31TvPMTm9uTiCSWzaheQySUcSyUH/46fPnuPQWof2yd0pGBtzee/IQWw== + "@netlify/functions@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@netlify/functions/-/functions-2.6.0.tgz#801a6fe8ceef2ce1512c637a28e53e6a3aae289b" @@ -1341,7 +1336,7 @@ which "^3.0.1" ws "^8.16.0" -"@nuxt/kit@3.11.2", "@nuxt/kit@^3.11.1", "@nuxt/kit@^3.11.2", "@nuxt/kit@^3.5.0", "@nuxt/kit@^3.6.2", "@nuxt/kit@^3.8.0": +"@nuxt/kit@3.11.2", "@nuxt/kit@^3.11.1", "@nuxt/kit@^3.11.2", "@nuxt/kit@^3.5.0", "@nuxt/kit@^3.8.0": version "3.11.2" resolved "https://registry.yarnpkg.com/@nuxt/kit/-/kit-3.11.2.tgz#dfc43c05992691bcd6aa58c14f88cf43e3abb788" integrity sha512-yiYKP0ZWMW7T3TCmsv4H8+jEsB/nFriRAR8bKoSqSV9bkVYWPE36sf7JDux30dQ91jSlQG6LQkB3vCHYTS2cIg== @@ -2704,12 +2699,11 @@ resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.4.23.tgz#e536a6dfd2f5f950d08c2e8ebcfe7e5329a851a1" integrity sha512-wBQ0gvf+SMwsCQOyusNw/GoXPV47WGd1xB5A1Pgzy0sQ3Bi5r5xm3n+92y3gCnB3MWqnRDdvfkRGxhKtbBRNgg== -"@vuetify/loader-shared@^1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@vuetify/loader-shared/-/loader-shared-1.7.1.tgz#0f63a3d41b6df29a2db1ff438aa1819b237c37a3" - integrity sha512-kLUvuAed6RCvkeeTNJzuy14pqnkur8lTuner7v7pNE/kVhPR97TuyXwBSBMR1cJeiLiOfu6SF5XlCYbXByEx1g== +"@vuetify/loader-shared@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@vuetify/loader-shared/-/loader-shared-2.0.3.tgz#11451c717e4a352ec311da52a79c857cd256c92f" + integrity sha512-Ss3GC7eJYkp2SF6xVzsT7FAruEmdihmn4OCk2+UocREerlXKWgOKKzTN5PN3ZVN5q05jHHrsNhTuWbhN61Bpdg== dependencies: - find-cache-dir "^3.3.2" upath "^2.0.1" "@vueuse/components@^10.9.0": @@ -4145,23 +4139,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-cache-dir@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" - integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== - dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" - -find-up@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - find-up@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" @@ -5081,13 +5058,6 @@ locate-character@^3.0.0: resolved "https://registry.yarnpkg.com/locate-character/-/locate-character-3.0.0.tgz#0305c5b8744f61028ef5d01f444009e00779f974" integrity sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA== -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - locate-path@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" @@ -5181,7 +5151,7 @@ magicast@^0.3.3: "@babel/types" "^7.24.0" source-map-js "^1.2.0" -make-dir@^3.0.2, make-dir@^3.1.0: +make-dir@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== @@ -6033,13 +6003,6 @@ openapi-typescript@^6.7.5: undici "^5.28.2" yargs-parser "^21.1.1" -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - p-limit@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" @@ -6054,13 +6017,6 @@ p-limit@^5.0.0: dependencies: yocto-queue "^1.0.0" -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - p-locate@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" @@ -6075,11 +6031,6 @@ p-map@^4.0.0: dependencies: aggregate-error "^3.0.0" -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - pacote@^17.0.6: version "17.0.7" resolved "https://registry.yarnpkg.com/pacote/-/pacote-17.0.7.tgz#14b59a9bf5e3442c891af86825b97b7d72f48fba" @@ -6251,13 +6202,6 @@ pinia@>=2.1.7: "@vue/devtools-api" "^6.5.0" vue-demi ">=0.14.5" -pkg-dir@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - pkg-types@^1.0.3: version "1.1.0" resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.1.0.tgz#3ec1bf33379030fd0a34c227b6c650e8ea7ca271" @@ -7934,12 +7878,12 @@ vite-plugin-vue-inspector@^4.0.2: kolorist "^1.8.0" magic-string "^0.30.4" -vite-plugin-vuetify@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/vite-plugin-vuetify/-/vite-plugin-vuetify-1.0.2.tgz#d1777c63aa1b3a308756461b3d0299fd101ee8f4" - integrity sha512-MubIcKD33O8wtgQXlbEXE7ccTEpHZ8nPpe77y9Wy3my2MWw/PgehP9VqTp92BLqr0R1dSL970Lynvisx3UxBFw== +vite-plugin-vuetify@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/vite-plugin-vuetify/-/vite-plugin-vuetify-2.0.3.tgz#b65ee4e05cfc6bf2b478a32b6d58b42398519f1e" + integrity sha512-HbYajgGgb/noaVKNRhnnXIiQZrNXfNIeanUGAwXgOxL6h/KULS40Uf51Kyz8hNmdegF+DwjgXXI/8J1PNS83xw== dependencies: - "@vuetify/loader-shared" "^1.7.1" + "@vuetify/loader-shared" "^2.0.3" debug "^4.3.3" upath "^2.0.1" @@ -8090,10 +8034,10 @@ vue@^3.4.21: "@vue/server-renderer" "3.4.23" "@vue/shared" "3.4.23" -vuetify@^3.3.7: - version "3.5.16" - resolved "https://registry.yarnpkg.com/vuetify/-/vuetify-3.5.16.tgz#5046aab39bfa536f0d99c5be4f9d91a7245c3246" - integrity sha512-jyApfATreFMkgjvK0bL7ntZnr+p9TU73+4E3kX6fIvUitdAP9fltG7yj+v3k14HLqZRSNhTL1GhQ95DFx631zw== +vuetify@^3.6.9: + version "3.6.9" + resolved "https://registry.yarnpkg.com/vuetify/-/vuetify-3.6.9.tgz#6c063fa6e8097e854406467db25e8d8a40e26e71" + integrity sha512-LVIZL0OCwzg3Aw2F8nT1rK/renpTPOcDEPe5E002Vj+VjXwsCNqwwxNteGfrcNlp0vgIJ8WusMvaxp69UJ3NJg== w3c-keyname@^2.2.4: version "2.2.8"