# esmultiloader

> Node.js ESM loader for chaining multiple custom loaders.

Latest version **1.0.0** (published 2022-04-10) · MIT license · 0 weekly downloads

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

## Install

```sh
npm install esmultiloader
pnpm add esmultiloader
yarn add esmultiloader
bun add esmultiloader
```

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-04-10 |
| First published | 2022-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=16.0.0 |
| Dependencies | 1 |
| Unpacked size | 9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | jhmaster |
| Maintainers | jhmaster |
| Keywords | experimental, node, custom, esm, loader, chaining, multi, multiloader |

## Links

- npm: https://www.npmjs.com/package/esmultiloader
- Repository: https://github.com/jhmaster2000/esmultiloader
- Homepage: https://github.com/jhmaster2000/esmultiloader#readme
- Issues: https://github.com/jhmaster2000/esmultiloader/issues
- npm.io page: https://npm.io/package/esmultiloader

## Dependencies (1)

- [yargs](https://npm.io/package/yargs.md) ^17.4.1

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2022-04-10
- 1.0.0-beta.3 — 2022-04-10
- 1.0.0-beta.2 — 2022-04-10
- 1.0.0-beta.1 — 2022-04-09

## README

# ESMultiloader
> Node.js ESM loader for chaining multiple custom loaders.

[![license][license-image]][license-url]
[![GitHub version][github-image]][github-url]
[![npm release][npm-image]][npm-url]
[![node-current][node-image]][node-url]

- Fast and lightweight
- No configuration required, but configurable if needed
- Usage compliant with Node's own [loader middleware chaining proposal](https://github.com/nodejs/loaders/blob/main/doc/design/proposal-chaining-middleware.md)
- Supports all three `resolve`, `load` and `globalPreload` loader hooks

## Install
```sh
npm i esmultiloader
```

## Usage
```sh
node --loader loader2 --loader ./loader1.js --loader esmultiloader file.js
```

### Optional Configuration
Options can be passed to `esmultiloader` to configure it's behavior using the following `/` separated list syntax:
```sh
node --loader esmultiloader/booleanoption/option=123/...
```
Where:
- `booleanoption` is a `true`/`false` option which is implicitly `true` when passed as an option.
- `option` is an option with a required value to be passed after the `=`, default values for these options vary per option.
- The first instance of a duplicated option takes precedence.
- A trailing slash does not matter.

Option | Type | Default | Description
-|-|-|-
`iterative` or `ltr` | Boolean | `false` | Chain loaders from left-to-right as described by the [iterative chaining proposal](https://github.com/nodejs/loaders/blob/main/doc/design/proposal-chaining-iterative.md) instead of right-to-left. (Mutually exclusive with the option below)
`middleware` or `rtl` | Boolean | `true` | Chain loaders from right-to-left as described by the [middleware chaining proposal](https://github.com/nodejs/loaders/blob/main/doc/design/proposal-chaining-middleware.md) instead of left-to-right. (Mutually exclusive with the option above)
`debug` | Boolean | `false` | Enable printing of `esmultiloader` debug logs.

[github-url]:https://github.com/jhmaster2000/esmultiloader
[github-image]:https://img.shields.io/github/package-json/v/jhmaster2000/esmultiloader.svg
[license-url]:https://github.com/jhmaster2000/esmultiloader/blob/master/LICENSE
[license-image]:https://img.shields.io/npm/l/esmultiloader.svg
[npm-url]:http://npmjs.org/package/esmultiloader
[npm-image]:https://img.shields.io/npm/v/esmultiloader.svg?color=darkred&label=npm%20release
[node-url]:https://nodejs.org/en/download
[node-image]:https://img.shields.io/node/v/esmultiloader.svg

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