{"library":"replacer-contenthash-webpack-plugin","title":"Replacer Contenthash Webpack Plugin","description":"A webpack plugin that replaces references to static files (CSS, JS, images, SVG sprites) in HTML templates and source files with their contenthash-based filenames. Current stable version is 1.0.17 (last updated August 2017). It requires the loader-utils package and works with webpack 3.x and older. Unlike webpack's built-in [contenthash] support, this plugin directly modifies text files (not just output filenames) and is useful for projects that need to update hardcoded paths in templates or source code. It is considered legacy; modern webpack versions (4+) have native similar functionality.","language":"javascript","status":"deprecated","last_verified":"Sat Apr 25","install":{"commands":["npm install replacer-contenthash-webpack-plugin"],"cli":null},"imports":["const ReplacerContenthashWebpackPlugin = require('replacer-contenthash-webpack-plugin');","const ReplacerContenthashWebpackPlugin = require('replacer-contenthash-webpack-plugin');","new ReplacerContenthashWebpackPlugin({ filesDir: ['src'] })"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const path = require('path');\nconst ReplacerContenthashWebpackPlugin = require('replacer-contenthash-webpack-plugin');\n\nmodule.exports = {\n  entry: './src/index.js',\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    filename: '[name].js',\n    publicPath: '/static/'\n  },\n  plugins: [\n    new ReplacerContenthashWebpackPlugin({\n      filesDir: ['src'],\n      templatesFolder: ['templates']\n    })\n  ]\n};","lang":"javascript","description":"Basic webpack config showing plugin instantiation with filesDir and templatesFolder options.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}