Closed samfrach closed 7 years ago
I could do it .. .but it is ugly....
var mydata = { v1: "\"Hello\"" }; new webpack.DefinePlugin({ // Environment helpers 'process.env': { ENV: JSON.stringify(ENV), myData: myData } }),
.... if I don't set the \" (backslash+quote) ... then my value is copied without quotes as a variable...
do you know why ?
thank
I don't, that is something that never occurred to me to do. Sounds ugly :/
Hello,
I would like to set properties in my html file.
In webpack.config.js, I have added an entry in the "DefinePlugin .. 'process.env' line.
In my index.html file, I've add a <%= process.env.myVariable %> line... but it fails...
Reference Error on the value of myVariable.... Is there a syntax to say "just display it" or is it looking for a file with the given name ?
thank you for your help and congrats for this projet, that helps me a lot :)