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: do not end process in middleware mode, fix #4196 #4232

merged 1 commit into from Jul 13, 2021


Copy link

@IanVS IanVS commented Jul 13, 2021


Fixes #4196.

It doesn't make much sense to end the vite process based on stdin when vite is running in middleware mode, as pointed out in #4196.

Additional context

I based the original check for CI off of what create-react-app does, but that project does not have a specific "middleware mode". I think it makes sense to include both of these checks, until/unless we can find a good way to detect running in docker/CI/container/non-interactive terminal (which is harder than it seems like it should be).

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@patak-dev patak-dev changed the title fix: do not end process in middleware mode fix: do not end process in middleware mode, fix #4196 Jul 13, 2021
@patak-dev patak-dev merged commit 1c994f8 into vitejs:main Jul 13, 2021
@IanVS IanVS deleted the no-exit-in-middleware-mode branch July 13, 2021 15:52
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
None yet
None yet

Successfully merging this pull request may close these issues.

vite.createServer() exits if process.env.CI != 'true'
5 participants