# acorn-dynamic-import

> Support dynamic imports in acorn

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

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2018-10-01 |
| First published | 2016-11-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 46 |
| Author | Jordan Gensler |
| Maintainers | jordangens |

## Links

- npm: https://www.npmjs.com/package/acorn-dynamic-import
- Repository: https://github.com/kesne/acorn-dynamic-import
- Issues: https://github.com/kesne/acorn-dynamic-import/issues
- npm.io page: https://npm.io/package/acorn-dynamic-import

## Recent versions

- 4.0.0 (latest) — 2018-10-01
- 3.0.0 — 2018-01-17
- 2.0.2 — 2017-02-28
- 2.0.1 — 2016-12-16
- 2.0.0 — 2016-11-29
- 1.0.1 — 2016-11-22
- 1.0.0 — 2016-11-22

## 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

Importing this module gives you a plugin that can be used to extend an Acorn parser:

```js
import Parser from 'acorn';
import dynamicImport from 'acorn-dynamic-import';

Parser.extend(dynamicImport).parse('import("something");');
```

To extend the AST walker for dynamic imports, you can injecting the new node type into [`acorn-walk`](https://www.npmjs.com/package/acorn-walk) like this:

```js
import inject from 'acorn-dynamic-import/lib/walk';
import * as acornWalk from 'acorn-walk';

const walk = inject(acornWalk);
```

## License

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

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