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.
rev-replace-loader
Advanced tools
Webpack loader to replace asset paths with hashed ones from a rev-manifest.json file
Replace rev'd asset references in your production JS compiled with Webpack!
Source File
var assetPath = "path/to/asset.jpg"
rev-manifest.json
{
"path/to/asset.jpg": "path/to/asset-78950a808a.jpg"
}
Output
var assetPath = "path/to/asset-78950a808a.jpg"
You can either pass a manifest
object directly, or pass a manfiestPath
for the loader to try. The latter will not error if no manifest file is found. Filenames will simply remain the same.
The manifestPath
parameter also supports glob
queries.
There is optional prefix
parameter - if given, it will be prepended to all queries to be replaced.
module: {
loaders: [
{
test: /\.jsx?$/,
loader: 'rev-replace',
query: {
manifest: require('path/to/manifest'),
manifestPath: 'path/to/manifest',
prefix: '/'
}
}
]
}
}
FAQs
Webpack loader to replace asset paths with hashed ones from a rev-manifest.json file
We found that rev-replace-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.