Skip to content

index.html without JS breaks multi-page app setup linking to the same stylesheet #13436

@patak-dev

Description

Describe the bug

There are two entry points (index.html and nojs.html). Both of them link to the same CSS stylesheet. There is an import for import"./nojs-ab7f0fe6.js"; in the generated main output, importing a file that doesn't exists in the dist folder.

Note: Originally as #13426. Starting a new issue with a simplified reproduction.

Reproduction

https://stackblitz.com/edit/vitejs-vite-uhnk5n

Steps to reproduce

npm install
npm run build

System Info

StackBlitz

Used Package Manager

npm

Logs

No response

Validations

Metadata

Assignees

No one assigned

    Labels

    feat: buildp3-minor-bugAn edge case that only affects very specific usage (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions