Skip to content

Vite dev server crashes with appType mpa on root URI #10966

@wolfgangwalther

Description

@wolfgangwalther

Describe the bug

Using appType: mpa without a <root>/index.html file will crash when requesting / instead of returning 404.

See #10336 (comment) for the change that introduced this.

Reproduction

https://stackblitz.com/edit/vitejs-vite-t9a2jr?file=vite.config.js

Steps to reproduce

Run the dev server and request /.

System Info

System:
    OS: Linux 5.15 Alpine Linux
    CPU: (32) x64 AMD Ryzen 9 3950X 16-Core Processor
    Memory: 104.02 GB / 125.75 GB
    Container: Yes
    Shell: 1.35.0 - /bin/ash
  Binaries:
    Node: 19.0.1 - /usr/local/bin/node
    Yarn: 3.2.4 - /usr/local/bin/yarn
    npm: 8.19.2 - /usr/local/bin/npm
  npmPackages:
    @vitejs/plugin-vue2: 2.0.1 => 2.0.1
    vite: 3.2.3 => 3.2.3

Used Package Manager

yarn

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions