-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Investigate root cause for vite 4.3.x can't build date-fns/locale in ssr (temp. patched) #12997
Comments
Does it work in Vite 4.2? Using 4.2 and running your repro I get:
|
I wasn't sure if the PR was the right fix, and in any case we should fix to report the right error as before instead. But happy to look into it again if you manage to find out how it works before. FWIW I tried fiddling with |
btea's PR makes the Vite4.3's resolve behavior the same as Vite4.2's, but it seems like there is another potential bug as bluwy said. Could you provide your complex app or maybe |
Hello, I'm also working on a SSR application where the server is built using webpack.
I confirm it works correctly When I downgrade to 4.2.0 |
Could you provide a mini-repro? @jaybe78 |
@DMOAbove that looks like a different issue and an expected one. And I don't think v4.2.2 could be regressing it, but if you found it so, please create a new issue with the repro. Thanks! An update for this issue. It was fixed at #13010 but the fix can be improved further based on the root cause, so it's left opened. Updating the labels for now. |
Describe the bug
I'm importing locales from date-fns like this:
import { enGB, es, de } from "date-fns/locale";
in my code.It worked fine with vite 4.2.x, but both 4.3.0 and 4.3.1 replace the "from" part with
… from "s";
which server, once it runs, can not find, for obvious reasons.Reproduction
https://github.com/indeyets/vite-bug
Steps to reproduce
run
npm install
followed bynpm test
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: