# absolute-to-alias-codefix

> Codefix to help with converting a codebase that uses webpack absolute imports to an alias instead.

Latest version **1.0.2** (published 2018-04-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install absolute-to-alias-codefix
pnpm add absolute-to-alias-codefix
yarn add absolute-to-alias-codefix
bun add absolute-to-alias-codefix
```

Provides the command `a2a`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-04-10 |
| First published | 2018-04-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Patrick Fricano |
| Maintainers | patrickfatrick |
| Keywords | webpack |

## Links

- npm: https://www.npmjs.com/package/absolute-to-alias-codefix
- Repository: https://github.com/patrickfatrick/absolute-to-alias-codefix
- Homepage: https://github.com/patrickfatrick/absolute-to-alias-codefix#readme
- Issues: https://github.com/patrickfatrick/absolute-to-alias-codefix/issues
- npm.io page: https://npm.io/package/absolute-to-alias-codefix

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) ^2.3.2
- [minimist](https://npm.io/package/minimist.md) ^1.2.0

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2018-04-10
- 1.0.1 — 2018-04-10
- 1.0.0 — 2018-04-10

## README

absolute-to-alias-codefix [--location -l][--alias -a][--directory -d]

This codefix exists just to aid in converting your codebase from webpack absolute imports to aliased imports

Example: if you have "./src" mapped as an absolute location in webpack so you can
\`import Component from "components/Component.js"\`, this can convert _all_ absolute imports
from that location to something like \`import Component from "~/components/Component.js"\`.

This script catches ES2015 import statements (both default and named) as well as require statements
and jest.mock statements.

Options:
--help -h view the list of options
--location -l source location currently being accessed as an absolute, defaults to "src"
--alias -a alias to use in place of the absolute, defaults to "~"
--directory -d absolute path to the root of the project, defaults to the current directory

---
_Source: https://npm.io/package/absolute-to-alias-codefix · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
