interpolate custom variables into index.html
npm install interpolate-html-plugin   
Extracted from create-react-app
This plugin is supposed to work with html-webpack-plugin
``bash`
yarn add interpolate-html-plugin --dev
`js`
module.exports = {
plugins: [
new InterpolateHtmlPlugin({
'NODE_ENV': 'development'
})
]
}
Then you can use %NODE_ENV% in your template html file, and you can use it with html-webpack-plugin's default template syntax (lodash.template):
`js`
<% if ('%NODE_ENV%' === 'development') { %>
do something
<% } %>
1. Fork it!
2. Create your feature branch: git checkout -b my-new-featuregit commit -am 'Add some feature'
3. Commit your changes: git push origin my-new-feature`
4. Push to the branch:
5. Submit a pull request :D
interpolate-html-plugin © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).
> egoistian.com · GitHub @egoist · Twitter @_egoistlily