I am currently attempting to incorporate a variable into my app.js file during the build process. For instance:
//app.js
var myvar = {{set_from_cli}};
Afterwards, I would like to execute something such as webpack -p --myvar='abc'
which would produce the following output:
//bundle.js
var myvar = 'abc';
I have conducted some research but so far have not been able to find the right solution or terminology to achieve this. Any help is greatly appreciated.