Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useScript dont work in nuxt/storybook #324

Open
AksTemes opened this issue Nov 26, 2024 · 1 comment
Open

useScript dont work in nuxt/storybook #324

AksTemes opened this issue Nov 26, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@AksTemes
Copy link

AksTemes commented Nov 26, 2024

📚 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

@AksTemes AksTemes added the help wanted Extra attention is needed label Nov 26, 2024
@huang-julien
Copy link
Member

The way nuxt storybook works currently is kinda buggy. It does runs two different config for Nuxt, one to build and one to be ran within storybook.
They do have an issue to possibly fix this issue by having a single unified config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants