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

[feat] allow using Vite's strict.port option #2507

Merged
merged 1 commit into from
Sep 27, 2021
Merged

[feat] allow using Vite's strict.port option #2507

merged 1 commit into from
Sep 27, 2021

Conversation

benmccann
Copy link
Member

Closes #2467

This delegates port checking to Vite and allows you to set strict.port: false. I set the strict.port default to true, which is different than Vite's default value for backwards compatibility

The server startup message is printed twice, but that will be fixed when we upgrade to Vite 2.6. That upgrade will remove their startup message and leave only ours

This doesn't touch preview mode for now. It may be possible to use the Vite server in preview mode as well, but that would be blocked by an upgrade to Vite 2.6

@changeset-bot
Copy link

changeset-bot bot commented Sep 27, 2021

🦋 Changeset detected

Latest commit: 9f60530

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

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit 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

@Conduitry
Copy link
Member

Is there any cleanup we can do now - or would stuff like removing port-authority as a dependency happen after we also (hypothetically) switch to using Vite's server for preview as well?

@benmccann
Copy link
Member Author

Yeah, I don't think we could remove port-authority yet since it's still used in preview mode. Not sure if you had any other ideas for cleanup, but I don't think there's a whole lot more we could do at the moment

@benmccann benmccann merged commit 5d47791 into master Sep 27, 2021
@benmccann benmccann deleted the strictPort branch September 27, 2021 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Showing port number are different between Vite and Kit if 3000 is already in use
2 participants