Skip to content

[alias] Support array of string as replacement value #754

@akphi

Description

@akphi
  • Rollup Plugin Name: @rollup/plugin-alias
  • Rollup Plugin Version: 3.1.1

Feature Use Case

Currently, the alias plugin only support string value for the replacement, not an array. This behavior is different from how other tools (like jest, typescript, webpack) handle aliases.

Feature Proposal

Could we support something like this:

...
plugins: [
    alias({
      // standard config
      entries: [
        { find: 'utils', replacement: ['../../../utils', '../../../utils2'] },
      ]
     // object format
     entries: {
       utils: ['../../../utils', '../../../utils2'],
     }
   })
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions