-
Notifications
You must be signed in to change notification settings - Fork 152
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
Upgrade to Vite 6 #310
Upgrade to Vite 6 #310
Conversation
"vite": "^5.0.0", | ||
"vite": "^6.0.0", | ||
"vitest": "^0.34.4" | ||
}, | ||
"peerDependencies": { | ||
"vite": "^5.0.0" |
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.
Bumped this straight to v6 instead of support both v5 and v6.
The Vite plugin is extremely stable and is feature complete.
I don't think we need to support both versions. You can stay on the current version until you are ready to update to Vite 6.
This will help keep our maintenance cost to a minimum.
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.
Wouldn’t that make it to version 2?
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.
Not according to semver.
See: https://semver.org/#what-should-i-do-if-i-update-my-own-dependencies-without-changing-the-public-api
You will need to upgrade to Vite 6 in your own project.
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.
Since the laravel-vite-plugin
is not a standalone and requires vite
to work, I’d consider the drop of Vite 5 to be a breaking change.
It becomes quickly complicated for users if they have to wonder if any minor/patch update will stop to work with their current setup. I would prefer a breaking, it sends a clearer signal.
What do you think?
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.
just ran npm update (after v1.1.0 was released) and got this...
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: undefined@undefined
npm error Found: vite@5.4.11
npm error node_modules/vite
npm error dev vite@"^5.4.10" from the root project
npm error
npm error Could not resolve dependency:
npm error peer vite@"^6.0.0" from laravel-vite-plugin@1.1.0
npm error node_modules/laravel-vite-plugin
npm error dev laravel-vite-plugin@"^1.0.5" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
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.
I also get the same message
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.
When is this PR getting merged. Asking politely! .. |
When I run |
This probably has to do with the fact that you have a SASS dependency somewhere on your project. It should have nothing to do with Vite.js or laravel-vite-plugin. |
This is directly related to the vitе, because by default sass compilation is used "legacy", for fix this warning need to set option in config to "modern-compiler" in vite 6 default compilation - "modern-compiler" |
add to config this
|
Yes @Moraiene you are correct. Once I put that in, it fixed it. I was close. I had the css>preprocessorOptions>scss block and had traced it to this plugin (because it requires vite 5) but I got stuck there. Once I put in your api parameter, the warning goes away. There were A LOT of Thanks again!!! |
@Pixel-Navigators Same, but if you change vite to 6 in your
|
Thanks for the merge @taylorotwell now I dont need the fix by @Moraiene, and I dont get build warnings anymore...yay! |
@Pixel-Navigators I found out the same. I opened a bug @ https://github.com/laravel/installer |
Upgrades supported Vite version to the recently released Vite 6.
Read more: https://vite.dev/blog/announcing-vite6
Breeze testing
Jetstream testing
Related PRs