unplugin-icons
unplugin-icons copied to clipboard
Unable to resolve path to module - Nextjs
Describe the bug
I followed all the steps to make this Icons library work within my setup (Nextjs application), however I'm getting an Eslint error that says:
Unable to resolve path to module '~icons/dashicons/arrow-right.jsx'.eslint[import/no-unresolved](https://github.com/import-js/eslint-plugin-import/blob/v2.27.5/docs/rules/no-unresolved.md) module "~icons/*"
Reproduction
Error with Nextjs 13
System Info
Ubuntu 22.0
Used Package Manager
pnpm
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guide.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- [X] The provided reproduction is a minimal reproducible of the bug.
The following settings may resolve your errors if you add them to ESLint.
rules: {
"import/no-unresolved": ["error", { ignore: ["^~icons/"] }],
},
ref: https://github.com/hannoeru/vite-plugin-pages/issues/41