{"id":19672,"library":"eslint-import-resolver-webpack","title":"eslint-import-resolver-webpack","description":"Webpack-aware module resolution plugin for eslint-plugin-import, version 0.13.11. Resolves import paths using a webpack configuration (webpack.config.js by default) to support custom resolve aliases, extensions, and modules. Released as part of the eslint-plugin-import ecosystem. Stable but limited to synchronous configs; async configs will break. Supports config file path, index, inline object, environment variables, and caching. Last major release in 2019; no active development, but still functional with webpack >=1.11.0 and eslint-plugin-import >=1.4.0.","status":"maintenance","version":"0.13.11","language":"javascript","source_language":"en","source_url":"https://github.com/import-js/eslint-plugin-import","tags":["javascript","eslint-plugin-import","eslint","jsnext","modules","webpack"],"install":[{"cmd":"npm install eslint-import-resolver-webpack","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-import-resolver-webpack","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-import-resolver-webpack","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for resolver to work with ESLint rules","package":"eslint-plugin-import","optional":false},{"reason":"peer dependency for parsing webpack configuration","package":"webpack","optional":false}],"imports":[{"note":"CommonJS require works as well; the package is CJS-only. No TypeScript types.","wrong":"const resolver = require('eslint-import-resolver-webpack')","symbol":"default","correct":"import resolver from 'eslint-import-resolver-webpack'"},{"note":"CommonJS destructuring also works.","wrong":"const { createResolver } = require('eslint-import-resolver-webpack')","symbol":"createResolver","correct":"import { createResolver } from 'eslint-import-resolver-webpack'"},{"note":"Type only; requires TypeScript and may not be exported.","wrong":"import { ResolverConfig } from 'eslint-import-resolver-webpack'","symbol":"ResolverConfig","correct":"import type { ResolverConfig } from 'eslint-import-resolver-webpack'"}],"quickstart":{"code":"// .eslintrc.js\nmodule.exports = {\n  settings: {\n    'import/resolver': {\n      webpack: {\n        config: './webpack.config.js',\n        configIndex: 0,\n        env: {\n          NODE_ENV: 'development'\n        },\n        cache: true\n      }\n    }\n  },\n  rules: {\n    'import/no-unresolved': 'error'\n  }\n};","lang":"javascript","description":"Configures eslint-plugin-import to resolve modules using Webpack aliases and extensions from a webpack configuration file."},"warnings":[{"fix":"Split async parts into a separate config file or use a synchronous wrapper.","message":"Synchronous Webpack configs only; async configs cause resolution failures.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Consider migrating to eslint-import-resolver-alias or custom resolver if issues arise.","message":"Package is in maintenance mode with no active development; may not support future ESLint or Webpack versions.","severity":"deprecated","affected_versions":">=0.13.0"},{"fix":"Specify config-index in settings to pick the desired config.","message":"Multiple webpack configurations: only first config with 'resolve' section is used by default; use 'configIndex' for selection.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Set env parameter in resolver config to pass required env vars.","message":"Environment variables must be passed via the 'env' setting; process.env values are not inherited.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Ensure webpack.config.js exists or provide an absolute path via the 'config' setting.","cause":"Resolver cannot locate webpack.config.js in the project root or specified path.","error":"Error: No webpack configuration found in ..."},{"fix":"Check that webpack config exports a valid configuration object with a 'resolve' section.","cause":"Webpack config function returns undefined or doesn't export an object with 'resolve'.","error":"Cannot read property 'resolve' of undefined"},{"fix":"Provide an 'env' setting to invoke the function, or use an object config.","cause":"Config setting is a function, but the resolver expects an object (if env not provided).","error":"TypeError: webpackConfig is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}