
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
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.
The npm package rollup-plugin-file-resolve receives a total of 0 weekly downloads. As such, rollup-plugin-file-resolve popularity was classified as not popular.
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.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.