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

fix: config port timing, fix #4094 #4104

Merged
merged 1 commit into from
Jul 30, 2021
Merged

fix: config port timing, fix #4094 #4104

merged 1 commit into from
Jul 30, 2021

Conversation

patak-dev
Copy link
Member

Description

Fix #4094 by moving the listening handler before the calls to the configureServer hook. In this way this handler is executed before the handlers added by plugins so this pattern works

      configureServer(server) {
        server.httpServer.once('listening', () => {
          console.log(server.config.server.port)
        })
      }

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

@Shinigami92 Shinigami92 added the p3-minor-bug An edge case that only affects very specific usage (priority) label Jul 3, 2021
@patak-dev patak-dev merged commit 6b98fdd into vitejs:main Jul 30, 2021
@patak-dev patak-dev deleted the fix/server-port-timing branch July 30, 2021 13:07
aleclarson pushed a commit to aleclarson/vite that referenced this pull request Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
2 participants