When I'm in development mode, the 404 page works like a charm. I have a really simple version that I'm trying to accomplish. When I generate to go live, the 404 page seems to show part of my home page for some reason? I also have it in my nuxt.config.json file to spit out a 404.html page, and I can't seem to generate a 404.html file -- I get the 200.html file every time. I've also tried setting generate.fallback to true with the same result. I think I might just be doing something dumb.
Here is an image of the error.vue file

and here is an image of my config

To clarify on this issue, it's a static site hosted on firebase. I was still unable to get it to generate a 404 instead of a 200. To get around it I had to create a 404.vue file in pages in order to get the 404 generated correctly.
Is this the recommended way to get error layouts to render?
@andrade1379 from what I can tell you define the error layout, and then that will generate by default the 200.html page. You're also able to set generate.fallback to true which _should_ produce the 404.html page instead of the 200. You're also supposed to be able to set it directly to a string value of 404.html to get that result, but I was unable to get those to work. At first I just generated the 200 page and renamed it to 404, but I can't get that to appear right in production. That all led me to just create a 404.vue file to get a 404 page to generate correctly.
Maybe it's related to the Firebase configuration. Have you checked this topic on Stack Overflow? https://stackoverflow.com/questions/45672351/firebase-hosting-create-a-404-page
Also, is your error.vue file in the 'layouts' directory or the 'pages' directory?
By adding an error.vue file in the 'layouts directory and specifying fallback: true, I do have a generated 404.html page in my dist folder.
generate: {
fallback: "404.html"
},
this seems to generate 404.html page in the root without any problems. Also working fine with Firebase
@lucpotage I actually have it working fine when there is a 404 with Firebase, so that's no problem, but thanks!
@gijo-varghese so I actually just updated my version of nuxt, and now this works just fine. 馃憤
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
this seems to generate 404.html page in the root without any problems. Also working fine with Firebase