Skip to content

Can't override a component to mock the component due to directory path.

Open

Description

When using storybook with vue only the following code worked.

import { NuxtIcon } from './mock-components/NuxtIcon'

setup((app) => {
  app.component('nuxt-icon', NuxtIcon)
  app.component('nuxtIcon', NuxtIcon)
})

Now using storybook with nuxt this no longer works.

When loading the nuxt-icon component into a story its picks up the global one used on the site not the one in the mock-components directory

Can anyone help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    status: blockedBlocked by an issue / missing feature of a dependency, or by another issueBlocked by an issue / missing feature of a dependency, or by another issuestatus: help wantedGood idea, but the core developers will not work on it at the momentGood idea, but the core developers will not work on it at the momenttype: enhancementNew feature or requestNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions