ionic
ionic copied to clipboard
fix: @nuxtjs/color-mode breaks the project
đ The bug
Not sure if this is ionic module problem or color-mode. But when adding @nuxtjs/color-mode to the ionic project it breaks.
[Vue warn]: inject() can only be used inside setup() or functional components.
[nuxt] [request error] [unhandled] [500] Cannot read properties of undefined (reading 'afterEach')
at eval (./.nuxt/dist/server/server.mjs:2687:36)
at fn (./.nuxt/dist/server/server.mjs:454:27)
at Object.callAsync (./node_modules/unctx/dist/index.mjs:68:19)
at callWithNuxt (./.nuxt/dist/server/server.mjs:456:23)
at applyPlugin (./.nuxt/dist/server/server.mjs:400:29)
at Module.applyPlugins (./.nuxt/dist/server/server.mjs:410:11)
at async createNuxtAppServer (./.nuxt/dist/server/server.mjs:59:7)
at async Object.renderToString (./node_modules/vue-bundle-renderer/dist/runtime.mjs:198:19)
at async eval (./.nuxt/dev/index.mjs:533:21)
at async eval (./.nuxt/dev/index.mjs:117:22)
### đ ī¸ To reproduce
https://stackblitz.com/edit/github-wgn6d9?file=package.json
### đ Expected behaviour
Both packaged works together as I need ability for users to manually change color mode.
### âšī¸ Additional context
_No response_