Skip to content

fix: do not end process in middleware mode, fix #4196#4232

Merged
patak-cat merged 1 commit intovitejs:mainfrom
IanVS:no-exit-in-middleware-mode
Jul 13, 2021
Merged

fix: do not end process in middleware mode, fix #4196#4232
patak-cat merged 1 commit intovitejs:mainfrom
IanVS:no-exit-in-middleware-mode

Conversation

@IanVS
Copy link
Copy Markdown
Contributor

@IanVS IanVS commented Jul 13, 2021

Description

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-cat patak-cat 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-cat patak-cat 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

5 participants