-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
fix(nuxt): do not render app pages alongside stories (fixes #472) #473
fix(nuxt): do not render app pages alongside stories (fixes #472) #473
Conversation
|
|
✅ Deploy Preview for histoire-examples-svelte3 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for histoire-examples-vue3 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for histoire-controls ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for histoire-site ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Thanks! Maybe a test would be nice so we don't get unexpected regression with Nuxt in the future 👍 |
…ence of an empty `nuxt-test` app
I've added a test, which passes w/ the fix and doesn't w/o, on both actual and latest nuxt versions. Side question: is it wanted that the |
Yes because in some cases (e.g. grids) there are no iframes. |
Description
Fixes #472
This PR stops
@histoire/plugin-nuxt
from rendering whatever is in nuxtapp
template under each story and the whole histoire page itself.It does so by injecting an empty compiled vue template instead of the app template.
It also disables
pages
innuxt.config
for the plugin not to try rendering the app routes, which avoidsvue-router
errors in console and the rendering of404s
in place of the extra app template.Additional context
Please tell me if i should write a test that checks that nuxt
app
template /404s
don't render alongside stories.Perhaps by checking there's no additional content instead of looking for specific content.
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).