fix: rollbar template needs PUBLIC_URL defined (#1127)
This commit is contained in:
parent
1b5a5a2963
commit
352407c71a
@ -1,6 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
@ -44,8 +43,10 @@
|
||||
|
||||
<!-- Built with: https://polyfill.io/v3/url-builder/ -->
|
||||
<!-- Targets IE11 -->
|
||||
<script
|
||||
src="https://polyfill.io/v3/polyfill.min.js?flags=gated&features=default%2CObject.values%2CArray.prototype.flat%2CObject.entries%2CSymbol%2CArray.prototype.includes%2CString.prototype.repeat%2CArray.prototype.find"></script>
|
||||
<script src="https://polyfill.io/v3/polyfill.min.js?flags=gated&features=default%2CObject.values%2CArray.prototype.flat%2CObject.entries%2CSymbol%2CArray.prototype.includes%2CString.prototype.repeat%2CArray.prototype.find"></script>
|
||||
<script type="text/javascript">
|
||||
window.PUBLIC_URL = '<%= PUBLIC_URL %>';
|
||||
</script>
|
||||
<script type="text/javascript" src="<%= PUBLIC_URL %>app-config.js"></script>
|
||||
<script type="module" src="<%= PUBLIC_URL %>init-service-worker.js"></script>
|
||||
|
||||
@ -61,7 +62,6 @@
|
||||
window.config.extensions = [SomeExtension];
|
||||
</script> -->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<noscript> You need to enable JavaScript to run this app. </noscript>
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ var isNotLocalDevelopment =
|
||||
['localhost', '127'].indexOf(location.hostname) === -1;
|
||||
|
||||
if (supportsServiceWorker && isNotLocalDevelopment) {
|
||||
const swFileLocation = window.PUBLIC_URL + 'sw.js';
|
||||
const swFileLocation = (window.PUBLIC_URL || '/') + 'sw.js';
|
||||
const wb = new Workbox(swFileLocation);
|
||||
|
||||
// Add an event listener to detect when the registered
|
||||
|
||||
Loading…
Reference in New Issue
Block a user