1.0.1 • Published 9 years ago

static-asset-hash-replace-webpack-plugin v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

Static Asset Hash Replace Webpack Plugin

NPM

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()
  ]
  ...
};

License

1.0.1

9 years ago

1.0.0

9 years ago