Skip to content

manifest.json file collision #9636

@benmccann

Description

@benmccann

Describe the bug

If you set build.manifest: true and have a file named manifest.json in the publicDir then the manifest.json file will be overwritten.

As a framework, we can set the name of build.manifest to something else, but it's impossible to know in advance all the possible file names our users may have.

Originally reported in sveltejs/kit#5803

Reproduction

git clone git@github.com:sveltejs/kit.git
cd kit/sites/kit.svelte.dev
git reset --hard 0801e8e942534d3f6c614523f0ee4fe10b602b26
pnpm install
pnpm run dev

Visit http://localhost:5173/manifest.json in the browser and see the Vite manifest rather than the file in static/manifest.json

System Info

Vite 3.0.5

Used Package Manager

pnpm

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changep2-edge-caseBug, but has workaround or limited in scope (priority)

    Type

    No type

    Projects

    Status

    Approved

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions