-
Notifications
You must be signed in to change notification settings - Fork 507
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
fix: pass custom entry filename when resolving prerenderer #2461
fix: pass custom entry filename when resolving prerenderer #2461
Conversation
Co-authored-by: Daniel Roe <daniel@roe.dev>
I'll check further into the failing tests |
@danielroe I took a different approach and just override the entry filename explicitly because the prerenderer is being built internally. Let me know if you have another recommended approach. |
514fd4b
to
e279708
Compare
Nice find! I think we can move the default rollup config to the pretender preset. |
7394e53
to
0033838
Compare
0033838
to
7e9e50d
Compare
Cool, done! |
@brandonroberts sorry my bad just tried locally moving to preset won't work because explicit config overrides entry name still.
May i ask there was a reason to not use original approach? While since now we have only one chunk entry for pretender, if in the future we opt pretender bundle into multi chunks for less mem footprint, we might need to change solution (and since no regression test might forget). If original approach was working well, i would suggest to use that and dynamically compute |
That approach broke 3 test suites tests where the preset is already overriding the entryFileNames property in combination with custom serverDir and output options. I'll take another look |
Thank you! Please let me know if could help on investing failed tests. |
Should be sorted out now. I needed to use the produced |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π
Thanks @pi0 and @danielroe! |
π Linked issue
Closes #2444
β Type of change
π Description
This allows the
rollupConfig.options.output.entryFileNames
to be passed to the nitro prerenderer if its a string, with the fallback toindex.mjs
. This fixes an issue where prerendering fails if a custom entry filename is used.π Checklist