2.0.0 • Published 3 years ago

@node-loader/http v2.0.0

Weekly downloads
18
License
MIT
Repository
github
Last release
3 years ago

@node-loader/http

A nodejs loader for loading modules over the network with http/https. This allows you to customize module resolution by creating a node.importmap file.

Installation

npm install --save @node-loader/http

# Or, if you prefer Yarn
yarn add --save @node-loader/http

Usage

Create a file that imports a module over http:

import * as singleSpa from "http://unpkg.com/single-spa@5.5.5/lib/esm/single-spa.dev.js";

Now run node with the --experimental-loader flag:

node --experimental-loader @node-loader/http file.js

Semantics

This project uses node-fetch to implement familiar HTTP semantics, including http redirects, https redirects, HTTP status checks, etc. Customizing the behavior of node-fetch is planned, but not yet implemented.

Composition

If you wish to combine import maps with other NodeJS loaders, you may do so by using node-loader-core.

2.0.0

3 years ago

1.1.0

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago