Skip to content
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

improve naming for (nested) bundled SSR page and API route entry points to better reflect original file based routing name #1226

Closed
thescientist13 opened this issue May 3, 2024 · 1 comment · Fixed by #1236 or #1237
Assignees
Labels
Adapter alpha.4 bug Something isn't working CLI documentation Greenwood specific docs enhancement Improve something existing (e.g. no docs, new APIs, etc) SSR v0.30.0
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented May 3, 2024

Summary

Coming out of #1223 / #1224 was the realization that nested SSR page bundles, in particular those with the name route based file name, e.g.

src/
  pages/
    blog/
      index.js

Will get the following top level bundle names from Rollup due to the repeated index.js files in this case

public/
  _index.js
  _index2.js
  _index3.js
  ...

Details

While in the PR this was fixed by leveraging the bundle names created by Rollup and updating outputPath on the route object in the graph, it would be better if the naming was more reflective of the source route name path, e.g.

public/
  _index.js
  _blog-index.js

Or output based on path

public/
  blog/
    _index.js
  _index.js

Notes:

  • This would require some sort of renaming within the bundling process in Rollup perhaps?
  • Should also deeply test for nested API routes and influence better graph properties as part of Content as Data #1167
@thescientist13 thescientist13 added enhancement Improve something existing (e.g. no docs, new APIs, etc) CLI SSR labels May 3, 2024
@thescientist13 thescientist13 added this to the 1.0 milestone May 3, 2024
@thescientist13 thescientist13 changed the title improve output naming for SSR page bundle entry point to reflect file based routing name improve naming for bundlned SSR page entry points to better reflect original file based routing name May 4, 2024
@thescientist13 thescientist13 changed the title improve naming for bundlned SSR page entry points to better reflect original file based routing name improve naming for bundled SSR page entry points to better reflect original file based routing name May 4, 2024
@thescientist13 thescientist13 changed the title improve naming for bundled SSR page entry points to better reflect original file based routing name improve naming for bundled SSR page entry points to better reflect original file based routing name (and fix adapters) May 4, 2024
@thescientist13 thescientist13 added the bug Something isn't working label May 4, 2024
@thescientist13 thescientist13 changed the title improve naming for bundled SSR page entry points to better reflect original file based routing name (and fix adapters) improve naming for bundled SSR page entry points to better reflect original file based routing name (and fix for adapters) May 4, 2024
@thescientist13 thescientist13 added Adapter documentation Greenwood specific docs labels May 4, 2024
@thescientist13 thescientist13 changed the title improve naming for bundled SSR page entry points to better reflect original file based routing name (and fix for adapters) improve naming for (nested) bundled SSR page and API route entry points to better reflect original file based routing name May 4, 2024
@thescientist13 thescientist13 self-assigned this Jun 1, 2024
@thescientist13
Copy link
Member Author

This was kind of done in #1236

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Adapter alpha.4 bug Something isn't working CLI documentation Greenwood specific docs enhancement Improve something existing (e.g. no docs, new APIs, etc) SSR v0.30.0
Projects
1 participant