-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
feat: add ssrRequire in ssrloadmodule for #5424 #5425
Conversation
cc @patak-js @antfu |
In the latest code, i add a function |
Maybe someone can follow up the pr? i am trying to add vite to transform server side code in my ssr framework replace webpack.i hope i can get more support @Shinigami92 @patak-js @antfu |
@zhangyuang I'm not the right person for SSR 🙁 sorry, hope someone else can help you |
thank you for response, i have succeed add vite in my ssr framework with |
Is it possible to add a test to the playground? |
ok, I was thinking exactly the same thing |
e654ddd
to
384da59
Compare
I have supplemented some test code in ssr-vue example, please review when free time @Shinigami92 |
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.
LGTM. I will bring this to our team meeting and see if this is what we expect for Vite generally.
Is there any progress 😊 @antfu |
@zhangyuang last fridays meeting we were only 3 members (mostly conflict with new sommer-winter time change). So in worst case could be that you need to wait another 1.5 week from now for next meeting, sry |
ok, take it easy,i am not hurried |
Active it, is there any progress? @Shinigami92 @antfu |
It's on p3 meeting notes 👍 Sadly Evan was not available last two meetings. Also seems that @antfu is very busy last days. |
Is there any progress? The feature is important for me 😭 |
Why is this important? What makes it absolutely necessary to use |
For example, i have some old code like const getConfig = () => require(resolve(process.cwd() ,'./config')) that need to used in |
Ref #5424 I will try use |
Maybe this is a problem and you should try to rewrite it to use new code 🤔 |
yeah,now i transmit config by function params🤔 looks like can fix the problem, although a little uncomfortable
发自我的iPhone
…------------------ Original ------------------
From: Shinigami ***@***.***>
Date: Sat,Dec 4,2021 1:05 AM
To: vitejs/vite ***@***.***>
Cc: yuuang ***@***.***>, Mention ***@***.***>
Subject: Re: [vitejs/vite] feat: add ssrRequire in ssrloadmodule for #5424 (PR#5425)
[...] i have some old code [...]
Maybe this is a problem and you should try to rewrite it to use new code 🤔
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Description
for #5424
require keywords is undefined when call ssrLoadmodule in entry-server file
Additional context
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. i think vite should support commonjs module syntax in nodejs environment because many old file code used it .What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).