How does Vite's SSR load module work? Is this issue a Vite bug or me bug? #19865
Replies: 5 comments
-
|
Actually the error is related to |
Beta Was this translation helpful? Give feedback.
-
|
Getting some help from Claude, not sure how accurate this is yet, investigating. |
Beta Was this translation helpful? Give feedback.
-
|
So, it's not just the injected import that is at issue. I fixed the jsx import issue with: ReactVite({
jsxImportSource: `polen/dependencies/react`,
})However now I am on to the next error, this time from an import that shows up in my source code: |
Beta Was this translation helpful? Give feedback.
-
|
There is something special cased about Maybe Vite react plugin is making those libraries as external...? |
Beta Was this translation helpful? Give feedback.
-
|
In the resolved config I see some mentions of those packages: |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am working on a Vite plugin
Xthat uses SSR load module function to read from within node_modules. However, when the plugin is used user gets error like:reactis a dep ofXand should be resolved from there, instead Vite ssr load module is trying to resolve it from the project.Can someone help me understand how ssr load module is supposed to work in regards to module resolution?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions