-
Notifications
You must be signed in to change notification settings - Fork 461
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
Prerender with named html files #607
Comments
Same issue here. I don't want to create a folder for each page. example: ~/.output/foo/index.html (Currently file) This behavior must be changeable via config. |
I would need this as well. As already mentioned, this used to be the default before it got changed in cdcd35a via #166. In nuxt/nuxt#13886 (where the opposite was requested, before #166 got implemented), a workaround was mentioned in this comment by @pi0:
And indeed, if we name a page component However, I noticed a problem with this workaround. The generated file has references to <link rel="preload" as="fetch" crossorigin="anonymous" href="/foo.html/_payload.js"> <script type="module">import p from "/foo.html/_payload.js";window.__NUXT__={...p,...({state:{},_errors:{},serverRendered:true,prerenderedAt:1681384634837,config:{public:{},app:{baseURL:"\u002F",buildAssetsDir:"\u002F_nuxt\u002F",cdnURL:""}}})}</script> As Is there a way to configure this properly? Or is this something that has to be fixed in nitro or Nuxt? This may also be related to nuxt/nuxt#14507. |
Additionally, if I have a page component with a parameter, e.g. <nuxt-link to="bar-3.html">Bar 3</nuxt-link> And there are no errors during generation. While if I put
Here's a repo with minimal changes to reproduce the issue: https://github.com/davidsandoz/nuxt-starter-static-payload-reproduction/tree/v3-codesandbox-static-payload-reproduction |
Most likely related to the crawling topic: #1067 |
Sorry for checking on this late. I think we can introduce an experimental option |
Describe the feature
The prerenderer currently prefers prerendering in subfolders. While I can take the advice of writing named html files in the prerender route config, I would prefer to make this the togglable behavior with a bool in the nitro config (similar to how there was one in Nuxt v2).
After doing some searching this was the default behavior before #166. It would be nice to have a bool that toggles this in nitro config if it does not already exist.
Additional information
The text was updated successfully, but these errors were encountered: