Skip to content

Add deprecation notice #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

A configurable NodeJS loader that combines multiple other loaders into one.

## Deprecation Notice

As of NodeJS 20, combining multiple loaders into one loader is possible via [chaining with the `--import` flag](https://nodejs.org/docs/latest-v20.x/api/module.html#chaining). It is recommended to switch to native NodeJS chaining.

## Motivation

[NodeJS Loaders](https://nodejs.org/dist/latest-v14.x/docs/api/esm.html#esm_experimental_loaders) are a new feature that allow you to configure the behavior of modules loaded with `import` or `import()`. NodeJS currently only allows you to specify a single loader when starting up Node. However, the `@node-loader/core` project allows you to combine multiple into a single loader through a configuration file.
Expand All @@ -12,7 +16,7 @@ A configurable NodeJS loader that combines multiple other loaders into one.
npm install --save @node-loader/core
```

For NodeJS@<16.12, use `@node-loader/core@1`. For NodeJS@>=16.12, use `@node-loader/core@latest`.
For NodeJS@<16.12, use `@node-loader/core@1`. For NodeJS@>=16.12 but <20, use `@node-loader/core@latest`. For Node >=20, use [`--import` chaining](https://nodejs.org/docs/latest-v20.x/api/module.html#chaining)

## Usage

Expand Down
Loading