
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
async-loader
Advanced tools
A webpack loader for async source modification. Supports only Promises for now.
npm i async-loader
var content = require('async?key=reportToServer!./file.txt');
// => returns what `config.reportToServer()` call resolves to
The config key whose value is an async function with signature,
function (source: string, loaderContext: Object): Promise
// webpack.config.js
module.exports = {
uploadImage: function(imageJson) {
var image = JSON.parse(imageJson);
return new Promise(function(resolve, reject) {
request.get(
'www.example.com/api' + image.src,
function(err, response, data) {
if (err) reject(err);
else resolve(data);
}
);
});
}
};
// js
var image = require('json!async?key=updloadImage!imagesize?json!./file.png');
We have something like makeWebpackConfig
which takes in some params and returns a webpack config with plugins and loaders applied to projects of the same type which share most of the configuration. So this loader comes in handy where all you have to worry about is modifying source asynchronously and returning a Promise.
FAQs
async webpack loader
The npm package async-loader receives a total of 5 weekly downloads. As such, async-loader popularity was classified as not popular.
We found that async-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
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.