Skip to content

Commit 59f1aa4

Browse files
committed
Fix index.html to load compiled JS from dist folder
- Update script src from /src/main.ts to ./dist/assets/index-*.js - Add modulepreload for Phaser chunk - This is the actual fix for the MIME type error The game will now load correctly when served from GitHub.
1 parent d10f978 commit 59f1aa4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@
3030
display: block;
3131
}
3232
</style>
33+
<script type="module" crossorigin src="./dist/assets/index-DmJ-27C-.js"></script>
34+
<link rel="modulepreload" crossorigin href="./dist/assets/phaser-0RJB29YE.js">
3335
</head>
3436
<body>
3537
<div id="game-container"></div>
36-
<script type="module" src="/src/main.ts"></script>
3738
</body>
3839
</html>

0 commit comments

Comments
 (0)