marvinhagemeister / karma-esbuild

Preprocessor based on esbuild for the karma test runner
MIT License
21 stars 10 forks source link

Rewrite `.ts` filepaths to `.js` during preprocessing #49

Closed jridgewell closed 2 years ago

jridgewell commented 2 years ago

When running in singleBundle: false mode, karma will inject a <script src="…"></script> for each matched esbuild file, using the normal base/* or absolute/* URL paths to the file. By overriding the extension used in file.path, we make sure that karma will point to a .js file and not a .ts or .tsx file.

Fixes #48