Skip to content

[Feature Request]: align resolve.alias behavior with @rollup/plugin-alias #3615

@sapphi-red

Description

@sapphi-red

What problem does this feature solve?

resolve.alias only uses the builtin resolver and does not call resolveId hooks. This behavior is different from @rollup/plugin-alias which is commonly used for this purpose and is a bit confusing for users migrating from rollup.

reproduction
npm run build errors, but npm run build:up runs successfully.

What does the proposed API look like?

Either

  • Align resolve.alias behavior with @rollup/plugin-alias
  • If it failed to resolve, show a message that resolve.alias does not call resolveId hooks so that users can know that they have to use a different thing

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions