Skip to content

Commit

Permalink
Remove conditionally loading config/env
Browse files Browse the repository at this point in the history
  • Loading branch information
remyvdwereld committed Jul 23, 2024
1 parent 1200a0e commit 5e04293
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,8 @@
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<base href="/">
<title>%REACT_APP_PAGE_TITLE%</title>
<script src='/config/env.js'></script>
<script type="module" src="src/index"></script>
<script>
// Check if the hostname contains "localhost" or is an IP address commonly used for localhost

if (window.location.host === 'localhost:2999') {
// Do not load the script
console.log('Skipping env.js on localhost.');
} else {
// Load the script
var script = document.createElement('script');
script.src = '/config/env.js';
document.head.appendChild(script);
}
</script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down

0 comments on commit 5e04293

Please sign in to comment.