framework-info
framework-info copied to clipboard
fix: changed the Vite port to the new Vite default port 5173
๐ Thanks for submitting a pull request! ๐
Summary
Fixes #791
Vite changed the default port for from 3000 to 5173 on May 31st or around that time. See
https://github.com/vitejs/vite/blob/2826303bd253e20df2746f84f6a7c06cb5cf3d6b/docs/guide/migration.md#dev-server-changes
https://github.com/vitejs/vite/pull/8417
I tested the other vite-based projects: Solid, Svelte Kit, Qwik, and Hydrogen. Qwik and Svelte Kit required the port update as well.
For us to review and ship your PR efficiently, please perform the following steps:
- [x] Open a bug/issue before writing your code ๐งโ๐ป. This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire ๐ฅ (e.g. incident related), you can skip this step.
- [x] Read the contribution guidelines ๐. This ensures your code follows our style guide and passes our tests.
- [ ] Update or add tests (if any source code was changed or added) ๐งช
- [ ] Update or add documentation (if features were changed or added) ๐
- [x] Make sure the status checks below are successful โ
A picture of a cute animal (not mandatory, but encouraged)
I don't think we have a way of handling different versions, do we? Presumably this will cause the reverse problem for older versions of Vite. I guess that's less of a problem because new projects are more likely to use new Vite, but it's worth noting.
I don't think we have a way of handling different versions, do we? Presumably this will cause the reverse problem for older versions of Vite. I guess that's less of a problem because new projects are more likely to use new Vite, but it's worth noting.
@ascorbic, yeah it's a good point. Have we handled something like this in the past? I'm not sure how problematic it will be. We can definitely make support aware of the issue.
Maybe a notice in the CLI of the port upgrade via a new field in the framework info JSON file if it fails via timeout to find the server?
{
"id": "vite",
"name": "Vite",
"category": "build_tool",
...
"dev": {
"command": "vite",
"port": 5173,
"pollingStrategies": [{ "name": "TCP" }]
"migrationMessage": "Vite's default port is now 5173. See the migration guide https://vitejs.dev/guide/migration.html#architecture-changes-and-legacy-options"
},
...
}
We could also check for both ports, but that seems more of bandaid solution.
There is an env var field available, so maybe we can use one to force the old version to use the new port number (or vice versa). Worth a try.
Deploy Preview for framework-info ready!
| Name | Link |
|---|---|
| Latest commit | f7a8132aba43d5135ea6ecb5209240f257b55b90 |
| Latest deploy log | https://app.netlify.com/sites/framework-info/deploys/634eb8a4fe9356000977372b |
| Deploy Preview | https://deploy-preview-792--framework-info.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.