Skip to content

useScript dont work in nuxt/storybook #324

Open
@AksTemes

Description

@AksTemes

📚 What are you trying to do?

Description

The useScript module is not functioning as expected when used within the Nuxt/Storybook environment. This issue is causing scripts to not load or execute properly, which affects the functionality of components relying on external scripts.

Steps to Reproduce

  1. Set up a Nuxt project with Storybook integration.
  2. Import and use the useScript module in a component.
  3. Attempt to load the component in Storybook.

Expected Behavior

The useScript module should load and execute the specified scripts correctly within the Storybook environment, just as it does in the Nuxt application.

Actual Behavior

The scripts do not load or execute properly, leading to missing functionality in the components.

Environment

  • Nuxt version: [3.12.4]
  • Storybook version: [8.2.0]
  • useScript module version: [0.9.5]

Additional Information

  • The issue does not occur when running the Nuxt application outside of Storybook.
  • No errors are logged in the console, making it difficult to diagnose the problem.
  • Warning in console after trigger loading script - [Vue warn] onScopeDispose() is called when there is no active effect scope to be associated with.

🔍 What have you tried?

No response

ℹ️ Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions