
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
external-loader
Advanced tools
var url = require("external-loader!./file.json");
// => emits a require to ./file.json on filesystem, and adds it to external resources
// => returns `require("/project/path/file.json")`
If name param is provided, resouce is copied to public directory, just like file-loader.
You can specify module system explicitly by setting libraryTarget param.
You can override publicPath by setting publicPath param.
If running with copy=1 parameter, external resource is copied to the public directory.
You can configure a custom filename template for your file using the query
parameter name. For instance, to copy a file from your context directory
into the output directory retaining the full directory structure, you might
use ?name=[path][name].[ext].
[ext] the extension of the resource[name] the basename of the resource[path] the path of the resource relative to the context query parameter or option.[hash] the hash or the content[<hashType>:hash:<digestType>:<length>] optionally you can configure
hashTypes, i. e. sha1, md5, sha256, sha512digestTypes, i. e. hex, base26, base32, base36, base49, base52, base58, base62, base64length the length in chars[N] the N-th match obtained from matching the current file name against the query param regExprequire("external-loader?name=js/[hash].script.[ext]!./javascript.js");
// => require("public_path/0dcbbaa701328a3c262cfd45869e351f.script.js")
require("external-loader?name=js/[hash].script.[ext]&publicPath=./foobar!./javascript.js");
// => require("./foobar/0dcbbaa701328a3c262cfd45869e351f.script.js")
require("file?name=html-[hash:6].html!./javascript.js");
// => require("/path/to/project/javascript.js");
FAQs
Webpack loader for requiring external files instead of building them
We found that external-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.