bridge
bridge copied to clipboard
SSR+data fetching+ bridge-meta option together stuck the app
Environment
Nuxi 3.0.0-rc.11 17:26:03
- Operating System:
Darwin - Node Version:
v16.16.0 - Nuxt Version:
2.16.0-27720022.54e852f - Nitro Version:
0.5.4 - Package Manager:
[email protected] - Builder:
webpack - User Config:
bridge,ssr,alias,head,css,plugins,components,buildModules,tailwindcss,modules,basic,robots,sentry,gtm,runtimeConfig,auth,axios,build,serverHandlers,devServerHandlers - Runtime Modules:
@nuxtjs/[email protected],@nuxtjs/[email protected],@nuxtjs/[email protected],@nuxtjs/[email protected],@nuxtjs/[email protected],[email protected],@nuxtjs/[email protected] - Build Modules:
(),@nuxtjs/[email protected],[email protected],@nuxt/[email protected]
Reproduction
nuxt.config.ts
export default defineNuxtConfig({
bridge: {
meta: true,
},
// ssr: false, // the two option above seems not compatible :/ whe cannot have meta and ssr enabled
...
}
pages/index.vue
<template>
<div v-if="page">
<template v-for="(section, i) in page.sections">
<!-- eslint-disable-next-line vue/require-component-is -->
<component v-bind="section" :key="i" />
</template>
</div>
</template>
<script setup lang="ts">
import Page from "../types/page";
useHead({
title: 'test'
})
const { data: page } = useLazyFetch<Page>('/api/v1/en-GB/page')
console.log('here')
</script>
Describe the bug
While running the app in dev mod, in loop forever and we cannot access the index page.
- If I uncomment
ssr: falsein the config so that it disable it, it correctly work and the page does not stuck - If I remove the fetch call and just use a variable data it correctly work and the page does not stuck
- If I remove
meta: truein the config it correctly work and the page does not stuck
Additional context
No response
Logs
There is no error logged , the app just stuck