nuxt-modules / device

Nuxt module for detecting device type.
MIT License
886 stars 49 forks source link

Usage with storybook #215

Open xFeXx opened 1 month ago

xFeXx commented 1 month ago

Hi @all, I use this Plugin in my nuxt3 + vue + vite setup and I try to get it working with storybook. The error I get is: Cannot destructure property 'isMobile' of 'useDevice(...)' as it is undefined.

The normal app work in dev mode as well as builded. Just Storybook won't work.

Deps in use:

    "nuxt": "3.11.2",
    "vue": "3.4.27",
    "@nuxtjs/device": "3.1.1",
    "@storybook/vue3": "8.1.6",
    "@storybook/vue3-vite": "8.1.6",
    "storybook": "8.1.6",
    "@nuxtjs/storybook": "8.0.0",
    "@storybook-vue/nuxt": "0.2.7",