-
Notifications
You must be signed in to change notification settings - Fork 49
Update lodash reference in vite optimizeDeps demo configs #123
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
Conversation
Thanks for this. There has been another reported issue with a project setup where someone had to Could I ask whether you could test the following in your project? Just want to make sure it doesn't break anything:
|
@Chriztiaan thanks for the quick reply! Yeah, that config worked for me -- didn't break anything. I wasn't familiar with the nested dependency syntax until you shared it; my intuition is that it's probably the better approach. Out of curiosity, I also tried with nested dependency declarations only. It almost worked, just had to change
Edit: I should add that my testing is extremely minimal here. I'm essentially just ensuring that vite bundles, the page loads in the browser without errors, and powersync requests are successful. |
Thanks for checking! I'll fiddle a bit and test it on my side. |
I've updated the diff to use the nested dependency syntax. Thanks for the help. |
Updated this after our package renaming |
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.
Thanks!
Hey folks!
I ran into a bit of trouble during setup with a new codebase, using powersync-sdk-web, bundled with vite. I modeled my vite config after the demo config here. Upon page load, the following error was displayed in the browser console:
Uncaught SyntaxError: The requested module '.../lodash/throttle.js' does not provide an export named 'default' (at AbstractStreamingSyncImplementation.js)
I was able to resolve the issue by changing the vite config
lodash
depdency line tolodash/throttle
. I suspect this may've been a regression with the recent lodash optimization. I'm new to vite, not sure if this is the best solution, but it worked for me, and I hope it'll help others hitting the same wall I ran into.Appreciate the great work you're doing here!