{"id":19662,"library":"eslint-import-resolver-exports","title":"eslint-import-resolver-exports","description":"A resolver for eslint-plugin-import that supports the package.json#exports field, enabling proper resolution of package entry points when using the exports map. Version 1.0.0-beta.5 is the current stable version, with infrequent releases. Key differentiators: it integrates seamlessly with existing resolvers (like node or typescript) and only handles exports resolution, delegating other resolution to a primary resolver. It uses resolve.exports under the hood.","status":"active","version":"1.0.0-beta.5","language":"javascript","source_language":"en","source_url":"https://github.com/cyco130/eslint-import-resolver-exports","tags":["javascript"],"install":[{"cmd":"npm install eslint-import-resolver-exports","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-import-resolver-exports","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-import-resolver-exports","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency: required for resolver functionality","package":"eslint-plugin-import","optional":false},{"reason":"peer dependency: required for runtime","package":"eslint","optional":false}],"imports":[{"note":"This package is used as an ESLint plugin resolver, not imported directly. Configuration is done via settings['import/resolver'].","wrong":"import resolver from 'eslint-import-resolver-exports'","symbol":"resolver (via settings)","correct":"settings: { 'import/resolver': { exports: { /* options */ } } }"},{"note":"If you need the resolver function directly, you can require the package. It returns a resolver compatible with eslint-plugin-import.","symbol":"default export (CommonJS require)","correct":"const resolver = require('eslint-import-resolver-exports')"},{"note":"The package exports a default function. In ESM, use default import; in CJS, use require directly.","wrong":"const resolver = require('eslint-import-resolver-exports').default","symbol":"ESM import","correct":"import resolver from 'eslint-import-resolver-exports'"}],"quickstart":{"code":"// .eslintrc.js\nmodule.exports = {\n  extends: ['plugin:import/recommended'],\n  plugins: ['import'],\n  settings: {\n    'import/resolver': {\n      node: {},\n      exports: {\n        // Options go here\n        conditions: ['node', 'import'],\n      },\n    },\n  },\n  rules: {\n    'import/no-unresolved': 'error',\n  },\n};","lang":"javascript","description":"Basic ESLint configuration to resolve package exports using both node and exports resolvers."},"warnings":[{"fix":"Add an additional resolver like 'node' in the settings.","message":"This resolver only handles package.json#exports, not other Node resolution features. Always include another resolver (e.g., node or typescript).","severity":"gotcha","affected_versions":"*"},{"fix":"Pin version to beta.5 or watch for breaking changes.","message":"Package is in beta; API may change.","severity":"deprecated","affected_versions":"1.0.0-beta.x"},{"fix":"Refer to resolve.exports documentation for valid options.","message":"Options are passed to resolve.exports; incorrect options may cause resolution failures.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Add another resolver (e.g., node) to settings['import/resolver'].","cause":"exports resolver not configured or missing; the resolver doesn't fallback to node resolution.","error":"Module not found: Can't resolve 'some-package' in 'some/file'"},{"fix":"Check the package's exports map; add fallback resolver or use a different import path.","cause":"The package's exports field may not include the subpath you're trying to import.","error":"Unable to resolve path to module 'some-package'."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}