-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
p2-nice-to-haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)
Description
Description
As an indirect user of Vite by using Astro, I would like the failed to load module for ssr to express why the module failed to load.
I believe there are multiple conditions that can trigger this - the one I experience often is a wrong path to a file. It's only through past experience of this error that I know, in my case at least, that this usually means the file was not found.
Suggested solution
vite/packages/vite/src/node/ssr/ssrModuleLoader.ts
Lines 87 to 93 in 3a586e4
| const result = | |
| mod.ssrTransformResult || | |
| (await transformRequest(url, server, { ssr: true })) | |
| if (!result) { | |
| // TODO more info? is this even necessary? | |
| throw new Error(`failed to load module for ssr: ${url}`) | |
| } |
Complete the TODO and display a more informative message stating why the module failed to load.
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
p2-nice-to-haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)