1.0.1 • Published 9 years ago
static-asset-hash-replace-webpack-plugin v1.0.1
Static Asset Hash Replace Webpack Plugin
This Webpack plugin replaces all file references inside assets which names changed during build process. Preconditions are, that the original basename of the file still exists and that the changed file is saved as asset from webpack.
Examples:
- "../images/button.png" => "../images/button.46e48ce0628835f68a73.png"
- "../images/icon.png" => "../images/46e48ce0628835f68a73-icon.png"
This replace logic is applied to .css and .html assets.
Installation
npm install static-asset-hash-replace-webpack-plugin
Usage
Add this to your webpack.config.js
var StaticAssetHashReplace = require('static-asset-hash-replace-webpack-plugin');
module.exports = {
...
plugins: [
new StaticAssetHashReplace()
]
...
};