Skip to content

Commit 3aa171a

Browse files
Fix public path for prod
1 parent 1312ff1 commit 3aa171a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎src/public/dist/standalone/index.html‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
Loading standalone codecrumbs experience...
1212
</div>
1313
</div>
14+
<script>
15+
var isLocalHost = location.hostname === "localhost" || location.hostname === "127.0.0.1";
16+
window.__webpack_public_path__ = isLocalHost ? '/bundle/' : '/src/public/dist/standalone/bundle/';
17+
</script>
1418
<script src="./bundle/main.bundle.js" type="text/javascript"></script>
1519
<script type="text/javascript">
1620
(function(window) {
@@ -21,7 +25,7 @@
2125

2226
var hash = location.hash;
2327
var key = '#showcase=';
24-
var showCaseName = hash.slice(hash.indexOf(key) + key.length) || '...';
28+
var showCaseName = hash.slice(hash.indexOf(key) + key.length) || 'todo-react-redux';
2529

2630
var fileElement = document.createElement('div');
2731
fileElement.innerText = 'Fetching "' + showCaseName + '" showcase...';

0 commit comments

Comments
 (0)