Skip to content

Conversation

@bluwy
Copy link
Member

@bluwy bluwy commented May 16, 2022

fix #4947

Turns out setting the default host value to localhost, makes plain --host option be "" instead of true.

Reverting #4932 as there isn't a nice way to handle this. Re Vite port being 5173 in the future, I've made 3000 as the default port in the base config.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

@changeset-bot
Copy link

changeset-bot bot commented May 16, 2022

🦋 Changeset detected

Latest commit: 74c198c

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

@bluwy bluwy marked this pull request as draft May 16, 2022 17:13
@bluwy
Copy link
Member Author

bluwy commented May 16, 2022

Hmm this isn't the right fix. If the --host option was never defined, and it defaults to localhost, we shouldn't override it if say, the port is configured in svelte.config.js (due to config merging). Was on oversight when adding the default values. Maybe we should revert #4932

EDIT: Issue addressed

@bluwy bluwy changed the title fix dev --host option behaviour revert dev command default options May 16, 2022
@bluwy
Copy link
Member Author

bluwy commented May 16, 2022

Pushed a commit to revert #4932. Sorry for the fuss!

@Rich-Harris Rich-Harris merged commit e339fdc into master May 16, 2022
@Rich-Harris Rich-Harris deleted the fix-dev-host branch May 16, 2022 18:15
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.

Adding --host to script is not exposing server on network

3 participants