# esbuild-plugin-resolve

> Change where a module dependency is resolved/imported from.

Latest version **2.0.0** (published 2023-05-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install esbuild-plugin-resolve
pnpm add esbuild-plugin-resolve
yarn add esbuild-plugin-resolve
bun add esbuild-plugin-resolve
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2023-05-15 |
| First published | 2021-07-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Mark Wylde |
| Maintainers | markwylde |
| Keywords | esbuild, esbuild resolve, resolve, swap dependencies, import, dependencies |

## Links

- npm: https://www.npmjs.com/package/esbuild-plugin-resolve
- Repository: https://github.com/markwylde/esbuild-plugin-resolve
- Homepage: https://github.com/markwylde/esbuild-plugin-resolve#readme
- Issues: https://github.com/markwylde/esbuild-plugin-resolve/issues
- npm.io page: https://npm.io/package/esbuild-plugin-resolve

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2023-05-15
- 1.1.0 — 2023-05-15
- 1.0.3 — 2021-08-16
- 1.0.2 — 2021-07-09
- 1.0.1 — 2021-07-09
- 1.0.0 — 2021-07-09

## README

# esbuild-plugin-resolve
Change where a module dependency is resolved/imported from.

## Installation
```
npm i --save-dev esbuild-plugin-resolve
```

## Usage
```javascript
import esbuild from 'esbuild';
import resolve from 'esbuild-plugin-resolve';

esbuild.build({
  entryPoints: ['./src/index.js'],
  bundle: true,
  outfile: './lib/index.js',
  plugins: [resolve({
    test: 'test-two/lib/example'
  })]
});

// The following will be rewritten
import test from 'test'
import test from 'test-two/lib/example'
```

---
_Source: https://npm.io/package/esbuild-plugin-resolve · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
