I have some typescript that looks like this:
import { Game } from './game'
And this transpiles into the following JavaScript:
import { Game } from './game'
(Note that there is no .js
extension added by the transpiler)
My browser (Chrome) tries to load the file game
rather than file game.js
which causes a 404.
Is there a way to tell the typescript compiler to add the .js
extension when generating the JavaScript?