Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
rollup-plugin-file-resolve
Advanced tools
Rollup plugin to resolve files with custom loaders at build time.
Rollup plugin to resolve files with custom loaders at build time.
npm:
npm i rollup-plugin-file-resolve -D
yarn:
yarn add rollup-plugin-file-resolve -D
pnpm:
pnpm add rollup-plugin-file-resolve -D
Checkout the Example
[alias]
Type: text | object
Determines from where to resolve the specific file.
Available built-in loaders: text
For example:
{
// Resolve `lmao` from `library.js`
lmao: "project/library.js",
// Resolve `myo` from `file.txt` and import it as a string
myo: {
path: "project/file.txt",
loader: "text"
}
}
Example output:
var lmao = "Random ahh file";
function myo(text) {
console.log(text);
}
Using your own custom loader is very simple, just replace the loader
prop with a function.
Here is an example:
myo: {
path: "project/file.txt",
loader: async (code) => await transform(code)
}
The loader function can be both sync or async.
loaders
Returns: Object of default loaders:
{
text: (code) => code;
}
Made by Angelo II
Copyright © (C) Angelo II, MIT license.
FAQs
Rollup plugin to resolve files with custom loaders at build time.
We found that rollup-plugin-file-resolve 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.