Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
asset-map-webpack-plugin
Advanced tools
Webpack plugin that creates a map of assets to public url slug for server agnostic usage.
Creates a json file that any server side technology can consume for asset declarations. Example output file:
{
"assets": {
"./smiley.jpeg": "/assets/smiley-db4f287d06928156270ca185fef0e026.jpeg",
"./test-checklist.jpeg": "/assets/test-checklist-b3b0fe76f4485db43467876f664d1f62.jpeg"
},
"chunks": {
"index": "/assets/index-2c9c445686f51177cf62.js"
}
}
The key is the relative path from the generated file to the image location in your source location. The value is the public url slug generated by webpack.
Add to the plugins array in your webpack config:
var AssetMapPlugin = require('asset-map-webpack-plugin');
module.exports = {
...
plugins: [
/**
* AssetMapPlugin
*
* @param {string} outputFile - Where to write the asset map file
* @param {string} [relativeTo] - Key assets relative to this path, otherwise defaults to be relative to the directory where the outputFile is written
*/
new AssetMapPlugin(outputFilename, relativeTo)
]
};
FAQs
Webpack plugin that creates a map of assets to public url slug for server agnostic usage.
The npm package asset-map-webpack-plugin receives a total of 6 weekly downloads. As such, asset-map-webpack-plugin popularity was classified as not popular.
We found that asset-map-webpack-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.