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

isr mode conflicting with island component #3

Open
zipme opened this issue Sep 25, 2023 · 0 comments
Open

isr mode conflicting with island component #3

zipme opened this issue Sep 25, 2023 · 0 comments

Comments

@zipme
Copy link

zipme commented Sep 25, 2023

When you have an island component that accepts some props:

// Test.server.vue
<script lang="ts" setup>
defineProps<{
  data: string;
}>();
</script>

<template>
  <div>
    <div>test island</div>
    <div>{{ data }}</div>
  </div>
</template>

And use it like

// index.vue
<template>
  <div>
    <Test data="world" />
  </div>
</template>

Locally it works fine, which produces:

<div>
  <div>test island</div>
  <div>world</div>
</div>

But when you have routeRules set to

'/**': { isr: 60 },

and deploy it to Vercel. Going to a page without this component first then navigate to that page, which triggers a XHR call to fetch the server component payload, the prop is undefined and you get

<div>
  <div>test island</div>
  <div></div>
</div>

Since this is related to isr mode (skipping isr setting entirely does work fine on vercel), should we include another setting here to bypass it?

routeRules: {
  '/__nuxt_island**: {isr: false}
  '/**': { isr: 60 },
}
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