🚀 Launch Week Day 4:Introducing the Alert Details Page: A Better Way to Explore Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

@node-loader/http

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@node-loader/http

An http and https nodejs loader

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

@node-loader/http

A nodejs loader for loading modules over the network with http/https.

Installation

npm install --save @node-loader/http

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

NodeJS 16.12 changed the Node Loader API. If using NodeJS@<16.12, please use @node-loader/http@1. Otherwise, use @node-loader/http@latest.

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 http loader with other NodeJS loaders, you may do so by using node-loader-core.

Keywords

node

FAQs

Package last updated on 09 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts