Skip to content

Content is not loaded after generate #1281

@cawa-93

Description

@cawa-93

Environment


  • Operating System: Linux
  • Node Version: v16.15.0
  • Nuxt Version: 3.0.0-rc.4
  • Package Manager: [email protected]
  • Builder: vite
  • User Config: css, build, typescript, modules, components
  • Runtime Modules: @nuxt/[email protected], unplugin-icons/nuxt
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-jdzmbl?file=components/Feed.vue

  1. Open stackblitz
  2. There are generated .output by npm run generate. I don't know how to execute the generation command in stackblits, so I generated the files locally and put them in the project. You should get the same result by regenerating.
  3. Run npm run preview
  4. On / path you should see valid JSON array with content. But on subpath you should see HTML instead JSON

Describe the bug

I have several pages to display the content. In the desktop, the filtered JSON is displayed correctly on each page. However, after generating the site, HTML is returned instead of JSON

Additional context

No response

Logs

No response

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