A core piece of tooling like this going through four major versions in two years really makes me hesitant to use it: it tells me that the authors of the tool don’t care about breaking changes and I’ll have to do a lot of maintenance work to keep up with the latest release.
…it tells me that the authors of the tool don’t care about breaking changes…
They sure seem to. The 4.0 changelog starts:
"This major is smaller in scope compared to Vite 3, with the main objective of upgrading to Rollup 3. We've worked with the ecosystem to ensure a smooth upgrade path for this new major."
From "Compatibility":
"The modern browser build now targets safari14 by default for wider ES2020 compatibility (#9063). This means that modern builds can now use BigInt and that the nullish coallessing operator isn't transpiled anymore. If you need to support older browsers, you can add @vitejs/plugin-legacy as usual."
Surely this is a side-effect of semantic versioning? Any breaking change means a new major version number. That doesn't necessarily mean a ton of maintenance work.
For example: the base version of Safari being targeted is now the version from 2020 instead of 2019. That's a breaking change. For the vast majority of people it is going to require zero work but for a minority of people (specifically targeting old iPad versions, perhaps) it's not something they can be automatically opted into.
In practice, it doesn't really matter. Every breaking change increases risk as an end user and reduces the likelihood that I'll upgrade at all, instead of switching to something else more stable.
Then again, the number of times I've been bit by a "minor" breaking change causing massive headaches during upgrades has made me somewhat jaded on the topic. No matter how great the tool, I will always prefer something more stable for real, production work.
Every breaking change increases risk as an end user and reduces the likelihood that I'll upgrade at all, instead of switching to something else more stable.
I understand this perspective and don't wish to sound negative but with this approach it's possible that web development simply isn't for you. The volatility in these tools is a reflection of the volatility in client browsers: they're upgraded constantly with new features that benefit the end user. I'm sending images to clients using WebP instead of PNG because the bandwidth savings are huge. That was a "breaking change" to my publishing pipeline but it was worth the investment.
At the same time you can keep using Vite 3. I've dug out old projects using old versions of Webpack and they've still functioned fine.
I feel like it depends on who you users are. At work, we cared a long time about IE users. Nowadays we don't, we would care about safari, but as that browser is untestable, we don't. So you either use chrome or Firefox LTS+ or the newest safari. Nothing else matters now.
Are they making breaking changes? I'll admit I don't frontend and I have no idea what niche Vite fills, but I briefly glanced at the release notes and I don't see a section talking about anything breaking even though this release marks a major revision. Maybe they're not using semver the way we're expecting.
Using it with Laravel, it seems to fill the niche of 'Webpack was easy to use and working just fine, let's add this shiny toy and make things a lot more complicated'
I love Laravel but I dislike their tendency to do this with new shiny toys.
This is the normal, widely accepted pace for “hot” web frontend frameworks! ;-)
Nobody’s forcing you to use it. I’m sticking with boring old Angular for my SPA needs…
And there have been more than a few in those 13 that were pretty decent breaking changes too. There are many good things about Angular for sure, but it has the same "issues" as any other frontend project.
Comments
A core piece of tooling like this going through four major versions in two years really makes me hesitant to use it: it tells me that the authors of the tool don’t care about breaking changes and I’ll have to do a lot of maintenance work to keep up with the latest release.
They sure seem to. The 4.0 changelog starts:
"This major is smaller in scope compared to Vite 3, with the main objective of upgrading to Rollup 3. We've worked with the ecosystem to ensure a smooth upgrade path for this new major."
From "Compatibility":
"The modern browser build now targets safari14 by default for wider ES2020 compatibility (#9063). This means that modern builds can now use BigInt and that the nullish coallessing operator isn't transpiled anymore. If you need to support older browsers, you can add @vitejs/plugin-legacy as usual."
Surely this is a side-effect of semantic versioning? Any breaking change means a new major version number. That doesn't necessarily mean a ton of maintenance work.
For example: the base version of Safari being targeted is now the version from 2020 instead of 2019. That's a breaking change. For the vast majority of people it is going to require zero work but for a minority of people (specifically targeting old iPad versions, perhaps) it's not something they can be automatically opted into.
In practice, it doesn't really matter. Every breaking change increases risk as an end user and reduces the likelihood that I'll upgrade at all, instead of switching to something else more stable.
Then again, the number of times I've been bit by a "minor" breaking change causing massive headaches during upgrades has made me somewhat jaded on the topic. No matter how great the tool, I will always prefer something more stable for real, production work.
I understand this perspective and don't wish to sound negative but with this approach it's possible that web development simply isn't for you. The volatility in these tools is a reflection of the volatility in client browsers: they're upgraded constantly with new features that benefit the end user. I'm sending images to clients using WebP instead of PNG because the bandwidth savings are huge. That was a "breaking change" to my publishing pipeline but it was worth the investment.
At the same time you can keep using Vite 3. I've dug out old projects using old versions of Webpack and they've still functioned fine.
I feel like it depends on who you users are. At work, we cared a long time about IE users. Nowadays we don't, we would care about safari, but as that browser is untestable, we don't. So you either use chrome or Firefox LTS+ or the newest safari. Nothing else matters now.
I think if you read the release notes for each version you'll see a different picture:
Vite 2 was a big architectural change, but Vite 3 and 4 have been driven by external changes -- node EOL, major rollup release, browser releases.
The amount of actual code churn is fairly low and dropping.
Are they making breaking changes? I'll admit I don't frontend and I have no idea what niche Vite fills, but I briefly glanced at the release notes and I don't see a section talking about anything breaking even though this release marks a major revision. Maybe they're not using semver the way we're expecting.
The migration guide looks simple enough: https://vitejs.dev/guide/migration.html
The biggest breaking change I see is just dropping compatibility for older browsers, you can however still enable it with a plugin.
There’s a bunch of custom rollup config you can do. If rollup made breaking changes between 2 and 3, those would be breaking for Vite too.
Using it with Laravel, it seems to fill the niche of 'Webpack was easy to use and working just fine, let's add this shiny toy and make things a lot more complicated'
I love Laravel but I dislike their tendency to do this with new shiny toys.
Interesting, "webpack" and "easy to use" are two words that I've never seen in the same sentence before.
Maybe Laravel Mix made it easy to use.
Or maybe I just learned it and dislike being forced to learn this new thing.
You are totally right, Laravel Mix really does make Webpack a breeze to use. But at that rate, you're using Mix and not Webpack :)
there are breaking changes, but pretty much any intended behaviour changing has automated codemods
This is the normal, widely accepted pace for “hot” web frontend frameworks! ;-) Nobody’s forcing you to use it. I’m sticking with boring old Angular for my SPA needs…
Angular has had 13 semver major bumps in the past 5.5 years
And there have been more than a few in those 13 that were pretty decent breaking changes too. There are many good things about Angular for sure, but it has the same "issues" as any other frontend project.
Sure. But they feel more like minor releases to me. Migrating from one version to the next is usually not a big deal.
Just like this new version of Vite..?