-
-
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
Production environment library method does not exist #9061
Comments
Code
developmenthtmlDiff is class v production environmenthtmlDiff is { default: class v, __esModule: true } |
Check the |
I found that |
The workaround that I did for this issue was to do something like: import $htmlDiff from "htmldiff-js";
const htmlDiff = $htmlDiff.default || htmlDiff But it feels a little bit tricky. So I hope you can solve this problem soon. |
I think this can only be used as an emergency measure, which should be handled by the plug-in to keep the dev and pro environments consistent |
Other dependencies I also encountered this similar problem |
I have the same situation,please solve it soon |
+1, Occured this when using lib mode for product build, and my module imports a commonJS module meanwhile. |
I can't reproduce this anymore with Vite 4.5.0. It might be fixed the same way as #2139 (comment). In dev and prod, I'm getting the |
Describe the bug
Production environment htmldiff execute function is undefined
Reproduction
https://stackblitz.com/edit/vitejs-vite-pisuhy?file=main.js
System Info
Used Package Manager
pnpm
Logs
Validations
The text was updated successfully, but these errors were encountered: