I use brunch for compilation of static assets. I've an index.html
containing a <script>
tag with environment variable placeholders. Based on the environment I want to change the placeholders to actual values. How can I do it the simplest way using brunch?
I tried several plugins, but although sounds to be a simple task, I fail to get anything replaced.
You can install
handlebars-brunch
plugin frommaster
, addto
plugins
inbrunch-config.js
, renameindex.html
toindex.html.hbs
and use it like this: