
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
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
The npm package rev-replace-loader receives a total of 8 weekly downloads. As such, rev-replace-loader popularity was classified as not popular.
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.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.