Skip to content

Chunk file name hashes depend on absolute path of project #4634

@wmassa

Description

@wmassa

Rollup Version

2.78.1

Operating System (or Browser)

Mac OS

Node Version (if applicable)

No response

Link To Reproduction

https://github.com/wmassa/rollup-directory-hash-repro

Expected Behaviour

According to the documentation, chunk file names are based on content hashes. I think this means that a project should have the same filenames no matter the absolute path of the project.

Actual Behaviour

The chunk file names change if you rename the directory of a project.

I created a repro where the same project is in a directory a and b. Rollup generates different filenames for the chunks. This is weird as I expect both projects to generate the same chunk files.

E.g. for me, it created a file called Bundle-692bf0ae.js in folder a and a file called Bundle-b8a1dd7d.js in folder b.

Thanks for looking!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions