# babel-plugin-import-path-replace

> Replaces strings predefined string in an import path during transpile.

Latest version **0.1.0** (published 2020-01-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-import-path-replace
pnpm add babel-plugin-import-path-replace
yarn add babel-plugin-import-path-replace
bun add babel-plugin-import-path-replace
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2020-01-10 |
| First published | 2020-01-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Logan McCaul |
| Maintainers | loganmccaul |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-import-path-replace
- Repository: https://github.com/loganmccaul/babel-plugin-import-path-replace
- Homepage: https://github.com/loganmccaul/babel-plugin-import-path-replace#readme
- Issues: https://github.com/loganmccaul/babel-plugin-import-path-replace/issues
- npm.io page: https://npm.io/package/babel-plugin-import-path-replace

## Recent versions

- 0.1.0 (latest) — 2020-01-10

## README

# babel-plugin-import-path-replace

Transforms import statements with a simple string replacement. This can come
in handy when your output files are in a different folder structure and the path
to imported files needs to be updated.


## Install

NPM: `npm install --save-dev babel-plugin-import-path-replace`

Yarn: `yarn add -D babel-plugin-import-path-replace`

## Usage

Add the following to your .babelrc
```
{
  "plugins": [
    [
      "import-path-replace",
      {
        "rules": [
          {
            "match": "String to be replaced",
            "replacement": "Replacement string"
          }
        ]
      }
    ]
  ]
}
```

### Example

#### Plugin

```
{
  "plugins": [
    [
      "import-path-replace",
      {
        "rules": [
          {
            "match": "../",
            "replacement": "../../"
          }
        ]
      }
    ]
  ]
}
```

#### Input

```
import example from '../example';
```

#### Output

```
import example from '../../example';
```

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