New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

ensure-script-loader

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ensure-script-loader

Get the script resources

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

ensure-script-loader

use glob to get script resources

Install

npm install --save-dev ensure-script-loader

Usage

var scripts = require("ensure-script-loader?pattern=./modules/**/*.js!");
scripts["./modules/first.js"]().then((first)=>{
    console.log(first);
});

notes

Although this is a'loader', it does not need to be passed in the source, so the parameters introduced in the'require' end with "!".

Options

nametypedefaultdescription
patternstringundefinedResource path
optionsobjectundefinedglob options

pattern:Using glob pattern,it is the relative path to the value of context in webpack.

Keywords

webpack

FAQs

Package last updated on 09 Mar 2018

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