lambda-packages
lambda-packages copied to clipboard
getFileInfo does not add `.html` extension in url when `build.format` is `file`
What version of astro are you using?
v1.1.6
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Linux
Describe the Bug
When in astro.config.mjs, Astro is configured with build.format 'file', I expect the Astro pages that are output by Astro.glob to have URLs ending in .html. However, the urls are as if build.format is set to directory.
We can fix this by patching GetFileInfo such that it also looks at config.build.format and adds the .html extension if Astro is configured to emit files
https://github.com/withastro/astro/blob/b5a91d40b77069dfab69af8747dd2941e149b824/packages/astro/src/vite-plugin-utils/index.ts#L5-L18
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-dpnbjc?file=src/pages/index.astro
Participation
- [X] I am willing to submit a pull request for this issue.