Skip to content

Commit

Permalink
Revert back to vuetify instance creation
Browse files Browse the repository at this point in the history
https://github.com/vuetifyjs/vuetify/releases/tag/v3.1.6 - This should solve the issue with the memory leak, so now reverting back to using vuetify's createVuetify instance
  • Loading branch information
Teranode committed Feb 25, 2023
1 parent b1c27c6 commit 86aa9ff
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@ There is a bug with vuetify where custom scss files might not function correctly

#### 2. Theme values not applying & memory leak (Source: https://github.com/vuetifyjs/vuetify/issues/16156)

There's currently a bug with vueuse/head where it's potentially causing a memory leak and also not adapting changes when using the `useTheme` composable. For now, I have made a workaround where the module will be running its own `createVuetify` instance inheriting from vueitfy and making the necissary changes to make it function. Until this is fixed thta will be used instead.
~~There's currently a bug with vueuse/head where it's potentially causing a memory leak and also not adapting changes when using the `useTheme` composable. For now, I have made a workaround where the module will be running its own `createVuetify` instance inheriting from vueitfy and making the necissary changes to make it function. Until this is fixed thta will be used instead.~~

This should have been fixed in vueitfy's `3.1.6` version.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nuxt-alt/vuetify",
"version": "1.1.0",
"version": "1.1.1",
"description": "An alternative module for setting up Vuetify 3 with nuxt.",
"homepage": "https://github.com/nuxt-alt/vuetify",
"author": "Teranode",
Expand All @@ -27,14 +27,14 @@
"dev:prepare": "unbuild --stub && nuxi prepare playground"
},
"dependencies": {
"@nuxt/kit": "^3.1.1",
"sass": "^1.58.0",
"@nuxt/kit": "^3.2.2",
"sass": "^1.58.3",
"vite-plugin-vuetify": "^1.0.2",
"vuetify": "^3.0.5"
"vuetify": "^3.1.6"
},
"devDependencies": {
"@types/node": "^18.11.18",
"nuxt": "^3.1.1",
"@types/node": "^18.14.1",
"nuxt": "^3.2.2",
"unbuild": "latest"
},
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ export default defineNuxtModule({
})

// Runtime
nuxt.options.alias['#vuetify'] = resolve('./runtime/vuetify');
// Todo: Remove in next build and it's remnants
//nuxt.options.alias['#vuetify'] = resolve('./runtime/vuetify');

// vuetify-specific composables
addImports([
{ from: resolve('./runtime/theme'), name: 'useTheme' },
{ from: CONFIG_KEY, name: 'useTheme' },
{ from: CONFIG_KEY, name: 'useDisplay' },
{ from: CONFIG_KEY, name: 'useRtl' },
{ from: CONFIG_KEY, name: 'useLocale' },
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/templates/plugin.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineNuxtPlugin } from '#imports';
import { createVuetify } from '#vuetify';
import { createVuetify } from 'vuetify';

const opts = JSON.parse('<%= JSON.stringify(options) %>')

Expand Down

0 comments on commit 86aa9ff

Please sign in to comment.