Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
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: '/'
}
}
]
}
}
0.4.0
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
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.