Skip to content

[v3] Page not found on preview after generate #3043

Closed
@brokuka

Description

@brokuka

Environment



Version

v3

Reproduction

// ~/pages/[...slug].vue

<script setup lang="ts">
const route = useRoute()

const { data } = await useAsyncData(route.path, () => queryCollection('docs').path(route.path).first())
</script>

<template>
  <ContentRenderer v-if="data" :value="data" />
</template>

Content

Add some pages in content folder.

For example:

Image

Description

Note

Using nuxt build all pages works as expected.

Getting 404 error on preview after generate nuxt generate. Works only page root /, for example if you have blog page there will be throwing error.

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions