Open yannbertrand opened 3 weeks ago
I believe you can get around this by telling Nitro about the route:
nitro: {
prerender: {
crawlLinks: true,
// Specify routes that the crawler may not be able to discover for prerendering
routes: [
'/file.json',
],
},
},
Environment
Build Modules: -
Reproduction
npm ci
npm run dev
-> should work correctlynpm run generate
-> breaks due to 404/file.json
Proof that it comes from the .json file only:
rm public/file.json
and theNuxtLink
frompages/index.vue
npm run generate
-> should work correctlyDescribe the bug
nuxt generate
breaks on the prerender step when a.json
file is linked in a page.Additional context
Weirdly, it does not break the CodePen when the file containing the link is
app.vue
:mv pages/index.vue app.vue
npm run generate
-> should work correctlyLogs