Skip to content

Improve emitAsset error with sourceFilename #13695

@artaommahe

Description

@artaommahe

Feature request

Currently assets with the same filenames provide an error like Conflict: Multiple assets emit different content to the same filename ${file}. This error includes final file destination (like assets/smth.svg e.x.) but there is no way to know what particular local files lead to this.

`Conflict: Multiple assets emit different content to the same filename ${file}`

What is the expected behavior?

Error message should provide info about what file has same final filename.

What is motivation or use case for adding/changing the behavior?

It's hard to search through dozen files with same name in monorepo to find that single one that conflicts with other.

How should this be implemented in your opinion?

Add assetInfo.sourceFilename to the error to help find files.

Are you willing to work on this yourself?
nope

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