-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
UI: Add resolve.dedupe
settings for vite
#7251
Conversation
✅ Deploy Preview for prefect-orion ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
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.
😱 nice - 1 liner
Vue is listed as a peer dependency for |
@znicholasbrown I don't totally understand but dedupe is a package feature. Npm even has its own dedupe flag. @stackoverfloweth tested trying to dedupe using npm and it didn't help. I found this in a vite github issue where someone was having the same issue we're experience and this was the suggested solution. There are lots of issues with peer dependencies in general. But its my understanding that marking something as a peer dependency only enforces the consuming package meets that requirement. It doesn't change at all how the actual code is bundled or packaged. Similar to how rollup's external settings work. From my testing, setting vue as external (as described here) fixes this same issue when consuming published packages. But the issue can be reintroduced when using packages locally because of how npm treats symlinks and how vite is producing the bundles. The vite docs for I'm definitely not 100% confident in this fix. But from my testing it fixes the development issue we've been experience and doesn't seem to have any negative side effects with the build itself. |
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.
Got it @pleek91 - thank you for the explanation, that's helpful!
@pleek91 if this is a user-facing enhancement, can you update the title to reflect the change in UX? If it's not user facing, can you change the label to |
@madkinsz updated the label. Thanks for staying top of these! I'll get it down soon hopefully 😄 |
Description
We've been having quite a few issues when linking orion-design locally for development. Adding
vue
to vite's dedupe config seems to resolve those issues.