package
interpolate custom variables into index.html
npm install interpolate-html-pluginGitHub-flavored package documentation.
Across all versions, last 30 days.
121,590 in 30 days
Runtime metadata.
Extracted from create-react-app
This plugin is supposed to work with html-webpack-plugin
yarn add interpolate-html-plugin --devmodule.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):
<% if ('%NODE_ENV%' === 'development') { %>
do something
<% } %>git checkout -b my-new-featuregit commit -am 'Add some feature'git push origin my-new-featureinterpolate-html-plugin © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).
egoistian.com · GitHub @egoist · Twitter @_egoistlily
Estimated unpacked size across 2 packages.
9.0 kB
Includes dependencies.
rem
shinjisays@gmail.com