$ npm install replace-in-file-webpack-plugin --save-dev Basic Usage Add the plugin to your webpack and config as follows: constReplaceInFileWebpackPlugin=require('replace-in-file-webpack-plugin'); constwebpackConfig={ entry:'index.js', ...