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

Static build #597

Open
NicklasDegnebolig opened this issue May 13, 2024 · 0 comments
Open

Static build #597

NicklasDegnebolig opened this issue May 13, 2024 · 0 comments

Comments

@NicklasDegnebolig
Copy link

Issue Description:

I'm encountering some challenges while integrating Storybook and Chromatic into my Nuxt 3 project. While everything runs smoothly in development mode, I'm facing difficulties when attempting to build Storybook for static files. It appears that some Vue/Nuxt components are not being bundled correctly, and crucial files like env.mjs are missing from the build.

Current Behavior:

When running Storybook in development mode, all components, including dynamic ones utilizing features like nuxt useRuntimeConfig, nuxt/vue components, composables, useAppConfig, function as expected.
However, upon generating static files using the Storybook build function, certain Vue/Nuxt components are not properly bundled. Additionally, the absence of the env.mjs file suggests potential configuration or build process issues.
Dynamic components seem particularly affected, as evidenced by discrepancies in their behavior post-build.

Steps to Reproduce:

Set up a Nuxt 3 project with Storybook
Develop and test Vue/Nuxt components in Storybook's development mode.
Execute the Storybook build command to generate static files.
Observe the inconsistencies in bundled components and missing files.

reprodcutin repositery: https://github.com/NicklasDegnebolig/nuxt3-storybook-sandbox

Expected Behavior:

Storybook should accurately bundle all Vue/Nuxt components, including dynamic ones, during the build process.
The presence of essential files like env.mjs should be ensured to maintain functionality across different environments.
Additional Information:

I've documented my observations and concerns in more detail on the Nuxt Modules GitHub repository here.
I'm open to contributing to the module to address these issues and ensure stable support for Nuxt 3 projects. However, I require guidance on how to proceed effectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant