# eslint-import-resolver-webpack

> Resolve paths to dependencies, given a webpack.config.js. Plugin for eslint-plugin-import.

Latest version **0.13.11** (published 2026-04-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-import-resolver-webpack
pnpm add eslint-import-resolver-webpack
yarn add eslint-import-resolver-webpack
bun add eslint-import-resolver-webpack
```

## Health

**Score 50/100 (C)** — status: active.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.13.11 |
| Published | 2026-04-02 |
| First published | 2015-11-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 6 |
| Dependencies | 10 |
| Unpacked size | 20.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5943 |
| Author | Ben Mosher |
| Maintainers | jfmengels, ljharb, benmosher |
| Keywords | eslint-plugin-import, eslint, jsnext, modules, webpack |

## Links

- npm: https://www.npmjs.com/package/eslint-import-resolver-webpack
- Repository: https://github.com/import-js/eslint-plugin-import
- Homepage: https://github.com/import-js/eslint-plugin-import/tree/HEAD/resolvers/webpack
- Issues: https://github.com/import-js/eslint-plugin-import/issues
- npm.io page: https://npm.io/package/eslint-import-resolver-webpack

## Dependencies (10)

- [debug](https://npm.io/package/debug.md) ^3.2.7
- [hasown](https://npm.io/package/hasown.md) ^2.0.2
- [lodash](https://npm.io/package/lodash.md) ^4.18.1
- [semver](https://npm.io/package/semver.md) ^5.7.2
- [resolve](https://npm.io/package/resolve.md) ^2.0.0-next.6
- [is-regex](https://npm.io/package/is-regex.md) ^1.2.1
- [find-root](https://npm.io/package/find-root.md) ^1.1.0
- [interpret](https://npm.io/package/interpret.md) ^1.4.0
- [is-core-module](https://npm.io/package/is-core-module.md) ^2.16.1
- [enhanced-resolve](https://npm.io/package/enhanced-resolve.md) ^0.9.1

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 0.13.11 (latest) — 2026-04-02
- 0.3.1 (next) — 2016-06-02
- 0.13.10 — 2024-12-11
- 0.13.9 — 2024-09-03
- 0.13.8 — 2023-10-23
- 0.13.7 — 2023-08-19
- 0.13.6 — 2023-08-16
- 0.13.5 — 2023-08-16
- 0.13.4 — 2023-08-08
- 0.13.3 — 2023-08-05
- 0.13.2 — 2021-10-20
- 0.13.1 — 2021-05-14
- 0.13.0 — 2020-09-27
- 0.12.2 — 2020-06-16
- 0.12.1 — 2020-01-11
- … 31 more at https://npm.io/package/eslint-import-resolver-webpack/versions

## README

# eslint-import-resolver-webpack

[![npm](https://img.shields.io/npm/v/eslint-import-resolver-webpack.svg)](https://www.npmjs.com/package/eslint-import-resolver-webpack)

Webpack-literate module resolution plugin for [`eslint-plugin-import`](https://www.npmjs.com/package/eslint-plugin-import).

> :boom: Only "synchronous" Webpack configs are supported at the moment.
> If your config returns a `Promise`, this will cause problems.
> Consider splitting your asynchronous configuration to a separate config.

Published separately to allow pegging to a specific version in case of breaking
changes.

To use with `eslint-plugin-import`, run:

```sh
npm i eslint-import-resolver-webpack -g
```

or if you manage ESLint as a dev dependency:

```sh
# inside your project's working tree
npm install eslint-import-resolver-webpack --save-dev
```

Will look for `webpack.config.js` as a sibling of the first ancestral `package.json`,
or a `config` parameter may be provided with another filename/path either relative to the
`package.json`, or a complete, absolute path.

If multiple webpack configurations are found the first configuration containing a resolve section will be used. Optionally, the `config-index` (zero-based) setting can be used to select a specific configuration.

```yaml
---
settings:
  import/resolver: webpack  # take all defaults
```

or with explicit config file name:

```yaml
---
settings:
  import/resolver:
    webpack:
      config: 'webpack.dev.config.js'
```

or with explicit config file index:

```yaml
---
settings:
  import/resolver:
    webpack:
      config: 'webpack.multiple.config.js'
      config-index: 1   # take the config at index 1
```

or with explicit config file path relative to your projects's working directory:

```yaml
---
settings:
  import/resolver:
    webpack:
      config: './configs/webpack.dev.config.js'
```

or with explicit config object:

```yaml
---
settings:
  import/resolver:
    webpack:
      config:
        resolve:
          extensions:
            - .js
            - .jsx
```

If your config relies on [environment variables](https://webpack.js.org/guides/environment-variables/), they can be specified using the `env` parameter.  If your config is a function, it will be invoked with the value assigned to `env`:

```yaml
---
settings:
  import/resolver:
    webpack:
      config: 'webpack.config.js'
      env:
        NODE_ENV: 'local'
        production: true
```

If your config is set as a function, it will be evaluated at every resolution. You have an option to prevent this by caching it using the `cache` parameter:

```yaml
---
settings:
  import/resolver:
    webpack:
      config: 'webpack.config.js'
      cache: true
```

## Support

[Get supported eslint-import-resolver-webpack with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-eslint-import-resolver-webpack?utm_source=npm-eslint-import-resolver-webpack&utm_medium=referral&utm_campaign=readme)

---
_Source: https://npm.io/package/eslint-import-resolver-webpack · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
