{"library":"replace-webpack-plugin","title":"replace-webpack-plugin","description":"A Webpack plugin to replace content blocks in HTML files using comment markers. Version 0.1.2 is the latest stable release, with no further updates since 2017. It allows replacing named blocks (`<!-- replace:name --> ... <!-- endreplace -->`) with provided strings, and also supports replacing a placeholder with the Webpack entry hash. Intended for simple HTML injection during builds, but it is a very old plugin with known limitations: it does not support Webpack 4+ or async operations, and the GitHub repository is archived. For modern projects, consider `html-webpack-plugin` with its template features instead.","language":"javascript","status":"deprecated","last_verified":"Sat Apr 25","install":{"commands":["npm install replace-webpack-plugin"],"cli":null},"imports":["const ReplacePlugin = require('replace-webpack-plugin');","const ReplacePlugin = require('replace-webpack-plugin');","new ReplacePlugin({...})"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// webpack.config.js\nconst ReplacePlugin = require('replace-webpack-plugin');\n\nmodule.exports = {\n  entry: './src/index.js',\n  output: {\n    path: './build',\n    filename: 'bundle.js'\n  },\n  plugins: [\n    new ReplacePlugin({\n      skip: false,\n      entry: 'index.html',\n      hash: '[hash]',\n      output: '/build/index.html',\n      data: {\n        css: '<link rel=\"stylesheet\" href=\"styles.css\">',\n        js: '<script src=\"bundle.js\"></script>'\n      }\n    })\n  ]\n};","lang":"javascript","description":"Configures ReplacePlugin in a Webpack 3 build to replace CSS and JS blocks in index.html and substitute [hash] placeholder.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}