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

bug/issue 1223 handle incorrect nested SSR page bundle output name mapping #1224

Merged
merged 4 commits into from
May 4, 2024

Conversation

thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Apr 28, 2024

Related Issue

resolves #1223

Summary of Changes

  1. Map SSR page output paths and bundle names to Rollup bundle names
  2. Added relativeWorkspacePagePath as convenience to the graph for each page, should track as part of Content as Data #1167
  3. Incorporated this change to handle a change in behavior in latest Node 18.20.x

Will make to align with work being done in #1212

TODO

  1. fix windows build failures
  2. Phantom .greenwood/_ directory?
  3. Downstream testing
  4. Create an enhancement issue for making sure we have better control over output map naming - improve naming for (nested) bundled SSR page and API route entry points to better reflect original file based routing name #1226

Main issue was with very loose enforcement of output naming, such that when running this sort of pages through Rollup

src/
  pages/
    blog/
      index.js
    index.js

Both of those will come out of the same name to Rollup, and because they will be duplicates, you'll be getting unexpected names, like

  • _index.js
  • _index2.js
  • _index3.js
  • ...

So the main fix here is to map our bundle names to whatever Rollup spits out for now just keep things working and in sync.

@thescientist13 thescientist13 added bug Something isn't working documentation Greenwood specific docs CLI Content as Data SSR labels Apr 28, 2024
@thescientist13 thescientist13 changed the title bug/issue 1223 map output bundle names and paths to rollup bundle output name bug/issue 1223 handle nested SSR page output bundle name conflicts May 3, 2024
@thescientist13 thescientist13 changed the title bug/issue 1223 handle nested SSR page output bundle name conflicts bug/issue 1223 handle nested SSR page bundle naming conflicts May 3, 2024
@thescientist13 thescientist13 mentioned this pull request May 3, 2024
38 tasks
@thescientist13 thescientist13 changed the title bug/issue 1223 handle nested SSR page bundle naming conflicts bug/issue 1223 handle nested SSR page bundle name mapping May 3, 2024
@thescientist13 thescientist13 changed the title bug/issue 1223 handle nested SSR page bundle name mapping bug/issue 1223 handle incorrect nested SSR page bundle output name mapping May 3, 2024
@thescientist13 thescientist13 merged commit d8124eb into master May 4, 2024
8 checks passed
@thescientist13 thescientist13 deleted the bug/issue-1223-nested-ssr-pages branch May 4, 2024 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLI Content as Data documentation Greenwood specific docs SSR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nested SSR pages (and API routes) are throwing a module not found error (needs additional patch for adapters)
1 participant