You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i don't know, if this is a problem with my config or a general probpem with the SDK, but i really have to figure out a solution for this problem, cause this behavior is the opposite of the reason why we/ people are using nuxt.
I simply want, if i prerender the pages through nuxt with nuxt generate or nuxt build in nuxt3, that the output is simple html, without any web components. it looks like as soon as i use the recommented <StoryblokComponent /> the (pre-)renderer stop to work from this point on (also in tests without fetch/ using static objects for this component).
here i have an example-page with a "normal" component (blue) in it , normal text/ html-element (violet) and once dynamic components with "StoryblokComponent" (green) and "component" (yellow) - in both cases a simple paragraph and a button.
when i generate the static html with nuxt generate, it will output the page as follow:
.. every component is prerendered as expected, but not the components from the <StoryblokComponent /> 🙈. how can i / we change this?
export default defineNuxtConfig({
mode: 'universal',
buildModules: [
'@pinia/nuxt'
],
/*
** Headers of the page
*/
head: {
title: pkg.name,
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: pkg.description }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
modules: [
[
'@storyblok/nuxt'
]
],
/*
** MODULE-CONFIG: Storyblok --> see: https://github.com/storyblok/storyblok-nuxt
*/
storyblok: {
accessToken: 'xxx',
bridge: process.env.NODE_ENV !== 'production',
apiOptions: { // --> see: https://github.com/storyblok/storyblok-js-client#class-storyblok
cache: {
type: "none"
}
},
useApiClient: true
},
/*
** Global variables
*/
runtimeConfig: {
// The private keys which are only available within server-side
apiSecret: 'xxx',
// Keys within public, will be also exposed to the client-side
public: {
serverUrl: 'xxx'
}
},
/*
** Global CSS
*/
css: [
'~/assets/styles/main.css',
'~/assets/styles/fonts.css',
],
html: {
minify: {
collapseBooleanAttributes: true,
decodeEntities: true,
minifyCSS: true,
minifyJS: true,
processConditionalComments: false,
removeEmptyAttributes: true,
removeRedundantAttributes: true,
trimCustomFragments: true,
useShortDoctype: true
}
},
ssr: true, // https://v3.nuxtjs.org/guide/deploy/static-hosting/
/*
** "nuxt generate" config
*/
generate: {
crawler: false, // crawler jumps like google with links trough the app/ site and tries so to get all relevant routes
devtools: process.env.NODE_ENV === 'development',
routes: [
'/',
]
},
/*
** nitro config (e.g.: ssr-prerendering / "nuxt build")
*/
nitro: {
prerender: {
routes: [
'/services/wizpages/treppenlift',
'/services/wizpages/rollstuhl',
'/',
]
}
}
The text was updated successfully, but these errors were encountered:
pat-behrendt
changed the title
Nuxt3: "StoryblokComponent" do not render on "nuxt build"
Nuxt3: "StoryblokComponent" does not prerender correctly
Sep 26, 2022
This one seems to be related #142. Let's catch up in our call on the state of this one and if something has changed from that issue or not @alexjoverm.
hiho,
i don't know, if this is a problem with my config or a general probpem with the SDK, but i really have to figure out a solution for this problem, cause this behavior is the opposite of the reason why we/ people are using nuxt.
I simply want, if i prerender the pages through nuxt with
nuxt generate
ornuxt build
in nuxt3, that the output is simple html, without any web components. it looks like as soon as i use the recommented<StoryblokComponent />
the (pre-)renderer stop to work from this point on (also in tests without fetch/ using static objects for this component).here i have an example-page with a "normal" component (blue) in it , normal text/ html-element (violet) and once dynamic components with "StoryblokComponent" (green) and "component" (yellow) - in both cases a simple paragraph and a button.
![Bildschirmfoto 2022-09-13 um 15 05 30](https://user-images.githubusercontent.com/20323898/189922415-ead42522-acad-4cd9-bd66-12ce84ef690c.png)
when i generate the static html with
![Bildschirmfoto 2022-09-13 um 15 23 31](https://user-images.githubusercontent.com/20323898/189922766-167dd305-0d20-41b7-a4d2-6cd044d9d04f.png)
nuxt generate
, it will output the page as follow:.. every component is prerendered as expected, but not the components from the
<StoryblokComponent />
🙈. how can i / we change this?thx 4 help :)
package.json:
nuxt.config.js:
The text was updated successfully, but these errors were encountered: