Skip to content

🔄 External aliased imports for unplugin-icons no longer work in v6 #1641

@PatrykWalach

Description

@PatrykWalach

Prerequisites

Reproduction url

https://stackblitz.com/edit/github-b2hktnir

Reproduction access

  • I've made sure the reproduction is publicly accessible

Good version

5.88.1

Bad version

6.0.0

Description of the regression

In the documentation https://knip.dev/guides/handling-issues#external-aliased-imports there's a suggested config to use with unplugin-icons

{
  "paths": {
    "~icons/*": ["node_modules/unplugin-icons/types/react.d.ts"]
  }
}

However, starting from Knip version 6.0.0 and above, this configuration no longer seems to have any effect.

As a result, imports using the ~icons/* alias are reported as unresolved. For example:

Unresolved imports (1)
~icons/material-symbols/more-horiz  index.ts:1:24

Metadata

Metadata

Assignees

No one assigned

    Labels

    regressionSomething is no longer working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions