bridge icon indicating copy to clipboard operation
bridge copied to clipboard

SSR+data fetching+ bridge-meta option together stuck the app

Open MatthD opened this issue 3 years ago • 0 comments

Environment

Nuxi 3.0.0-rc.11 17:26:03

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: false in 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: true in 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

MatthD avatar Sep 29 '22 15:09 MatthD