'Create React App, change script path based on host name
I have a react app which is being hosted on two different hosts. For each host assets folder where bundle.js and CSS files are store is different. Is there any way to change the path defined by CRA in script tag in index.html based on host name?
Example
for host abc folder will be let's say folderA and for host xyz assets folder will be folderX.
I know that we can define this path in package.json as homepage: "/folderA" or homepage: "/folderX" but then it works for one and not the other.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
