Skip to content
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

fix(admin-vite-plugin,admin-bundler,ui,icons,dashboard,framework,types): Update Vite dependencies #11414

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

kasperkristensen
Copy link
Contributor

@kasperkristensen kasperkristensen commented Feb 12, 2025

What

Not entirely sure what was happening as I couldn't reproduce the issue, but Adrien faced the issue yesterday when working with local versions of our packages. It does appear as if the range we had before could lead to a version of Vite to be installed with said bug.

Copy link

vercel bot commented Feb 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2025 9:55am
6 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Feb 12, 2025 9:55am
api-reference-v2 ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2025 9:55am
docs-ui ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2025 9:55am
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2025 9:55am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2025 9:55am
resources-docs ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2025 9:55am

Copy link

changeset-bot bot commented Feb 12, 2025

🦋 Changeset detected

Latest commit: da01177

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 66 packages
Name Type
@medusajs/admin-vite-plugin Patch
@medusajs/admin-bundler Patch
@medusajs/icons Patch
@medusajs/ui Patch
@medusajs/dashboard Patch
@medusajs/framework Patch
@medusajs/types Patch
integration-tests-http Patch
@medusajs/medusa Patch
@medusajs/test-utils Patch
@medusajs/api-key Patch
@medusajs/auth Patch
@medusajs/cache-inmemory Patch
@medusajs/cache-redis Patch
@medusajs/cart Patch
@medusajs/currency Patch
@medusajs/customer Patch
@medusajs/event-bus-local Patch
@medusajs/event-bus-redis Patch
@medusajs/file Patch
@medusajs/fulfillment Patch
@medusajs/index Patch
@medusajs/inventory Patch
@medusajs/link-modules Patch
@medusajs/locking Patch
@medusajs/notification Patch
@medusajs/order Patch
@medusajs/payment Patch
@medusajs/pricing Patch
@medusajs/product Patch
@medusajs/promotion Patch
@medusajs/region Patch
@medusajs/sales-channel Patch
@medusajs/stock-location Patch
@medusajs/store Patch
@medusajs/tax Patch
@medusajs/user Patch
@medusajs/workflow-engine-inmemory Patch
@medusajs/workflow-engine-redis Patch
@medusajs/auth-emailpass Patch
@medusajs/auth-github Patch
@medusajs/auth-google Patch
@medusajs/file-local Patch
@medusajs/file-s3 Patch
@medusajs/fulfillment-manual Patch
@medusajs/locking-postgres Patch
@medusajs/locking-redis Patch
@medusajs/notification-local Patch
@medusajs/notification-sendgrid Patch
@medusajs/payment-stripe Patch
@medusajs/core-flows Patch
@medusajs/js-sdk Patch
@medusajs/modules-sdk Patch
@medusajs/orchestration Patch
@medusajs/utils Patch
@medusajs/workflows-sdk Patch
@medusajs/cli Patch
@medusajs/medusa-oas-cli Patch
@medusajs/oas-github-ci Patch
@medusajs/telemetry Patch
@medusajs/admin-sdk Patch
@medusajs/admin-shared Patch
@medusajs/toolbox Patch
@medusajs/ui-preset Patch
create-medusa-app Patch
medusa-dev-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -38,7 +38,7 @@
"glob": "^10.3.10",
"postcss": "^8.4.32",
"tailwindcss": "^3.3.6",
"vite": "^5.2.11"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a Q: as I was looking into the node modules generated in production I noticed the node modules size is pretty big - can Vite be a devDependency instead, or is it used for something other than building? The same applies to the rollup and vite plugins above.

Similarly, should express be a peerDependency? I see it defined in both devDependencies and dependencies now.

Copy link
Contributor Author

@kasperkristensen kasperkristensen Feb 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The admin-bundler is a development tool, and it uses Vite for the commands that it expose so it can't be a devDependency.

What we could do is make it a peerDependency and then also make vite a peerDependency of @medusajs/medusa, and require that people install Vite in their project. But still we might end up with Vite in the production build, because the build and development commands themselves are build directly into the source of @medusajs/medusa. To prevent this we would really need to rethink how the build step and dev server of Medusa work, and move it into a separate package that can be installed along with @medusajs/medusa as a devDependency.

For express it used to be a peerDependency, but Virk recently changed it to a dependency instead. But as long as the versions are the same across packages and we don't end up with multiple install, I don't believe it should effect the bundle size?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the express one is not an issue, I just saw it in both places and I found it strange, it's less about the bundle size :D

If the admin-bundler is only for building the app, but not used at runtime, wouldn't be ok if it is in the devDependencies of @medusajs/medusa? Since the build commands will never be called in production, I think it should be fine (but we can test it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants