Linked Questions

Popular Questions

I want to change a path in a javascript file so my image shows up in my development deployment as well as in my production deployment and the paths are different for each deploy. For example:

var imgPath = "/CMSTemplates/ToolingU8/img/";
<img src={imgPath + "Tooling-U-logo.png"} alt="logo" style={{height: "51px", width: "248px", margin: "1em" }}/>

In the deploy script for dev, I want to change imgPath to be includes/img/

So when I run npm run build:dev it would have one path and npm run build:prod another.

Is this possible?

Related Questions