# acorn-dynamic-import-with-walk-support

> Support dynamic imports in acorn, with walk support

Latest version **2.1.0** (published 2018-01-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install acorn-dynamic-import-with-walk-support
pnpm add acorn-dynamic-import-with-walk-support
yarn add acorn-dynamic-import-with-walk-support
bun add acorn-dynamic-import-with-walk-support
```

## 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 | 2.1.0 |
| Published | 2018-01-10 |
| First published | 2018-01-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Cody Schaaf and Jordan Gensler |
| Maintainers | codyschaaf |

## Links

- npm: https://www.npmjs.com/package/acorn-dynamic-import-with-walk-support
- Repository: https://github.com/CodySchaaf/acorn-dynamic-import-with-walk-support
- Homepage: https://github.com/CodySchaaf/acorn-dynamic-import-with-walk-support#readme
- Issues: https://github.com/CodySchaaf/acorn-dynamic-import-with-walk-support/issues
- npm.io page: https://npm.io/package/acorn-dynamic-import-with-walk-support

## Dependencies (1)

- [acorn](https://npm.io/package/acorn.md) ^4.0.3

## Recent versions

- 2.1.0 (latest) — 2018-01-10
- 2.0.2 — 2018-01-10

## README

# Dynamic import support in acorn

This is plugin for [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript.

For more information, check out the [proposal repo](https://github.com/tc39/proposal-dynamic-import).

## Usage

You can use this module directly in order to get Acorn instance with plugin installed:

```js
import acorn from 'acorn-dynamic-import';
// or...
const acorn = require('acorn-dynamic-import').default;
```

Or you can use `inject.js` for injecting plugin into your own version of Acorn like this:

```js
const acorn = require('acorn-dynamic-import/lib/inject').default(require('./custom-acorn'));
```

Then, use the `plugins` option whenever you need to support dynamicImport while parsing:

```js
const ast = acorn.parse(code, {
  plugins: { dynamicImport: true }
});
```

To use the updated walk functionality the process is similar. You can require the default implementation as:

```js
import walk from 'acorn-dynamic-import/lib/walk';
// or...
const dynamicImportWalk = require('acorn-dynamic-import/lib/walk').default;
```

Or you can use the injectable version for injecting the new walk functionality into your own version of Acorn like this:

```js
const walk = require('acorn-dynamic-import/lib/walk').inject(require('acorn/dist/walk'));

``` 

## License

This plugin is issued under the [MIT license](./LICENSE).

---
_Source: https://npm.io/package/acorn-dynamic-import-with-walk-support · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
