-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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: ssr) NodeRequire is undefined when call ssrLoadmodule in entry-server file #5424
Comments
As far as I know, in a Node.js ES module you need to use |
What do you mean is use |
Get |
I'm not sure if this is something we should support. I remember in a team meeting before that |
Describe the bug
ssrModuleLoader
function only injectNodeJs.Global
in context but notNodeRequire
which causerequire is not defined
error occur when evaluating!entry
module. I can't determine whether vite do this on purpose.here is a pr maybe fix the problemReproduction
https://github.com/zhangyuang/vite-ssr-error-require
System Info
Used Package Manager
yarn
Logs
Validations
The text was updated successfully, but these errors were encountered: