{"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,"search_vec":"'0.13.11':18 '1.11.0':81 '1.4.0':87 '2019':72 'activ':74 'alias':33 'async':53 'awar':8 'break':56 'cach':67 'config':52,54,58 'configur':25 'custom':31 'default':28 'develop':75 'ecosystem':46 'environ':64 'eslint':2,14,43,84,90,93 'eslint-import-resolver-webpack':1 'eslint-plugin-import':13,42,83,89 'extens':34 'file':59 'function':78 'import':3,16,20,45,86,92 'index':61 'inlin':62 'javascript':88 'jsnext':94 'last':68 'limit':49 'major':69 'modul':9,36,95 'object':63 'part':39 'path':21,60 'plugin':11,15,44,85,91 'releas':37,70 'resolut':10 'resolv':4,19,32 'stabl':47 'still':77 'support':30,57 'synchron':51 'use':22 'variabl':65 'version':17 'webpack':5,7,24,80,96 'webpack-awar':6 'webpack.config.js':26","created_at":"2026-04-25T11:19:01.625047+00:00","updated_at":"2026-04-25T11:19:01.625047+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/import-js/eslint-plugin-import","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-import-resolver-webpack","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}