Description
openedon Jun 1, 2022
Bug Report
π Search Terms
source map, extension
π Version & Regression Information
TypeScript 4.7.2
β― Playground Link
Not a Playground link, but the repro is here: https://github.com/unional/tersify/tree/webpack
To repro it, run yarn bundle
and open the demo.html
in browser.
You can see that the source-map-loader
able to get the unpartial/ts/index.ts
file, but not the files it referenced (./required.js
, ./unpartial.js
).
This is because the files are actually in TS. i.e. required.ts
and unpartial.ts
.
I'm not sure if this is a TypeScript 4.7 bug or source-map-loader
needs to be updated to support this.
But given it was working prior to TypeScript 4.7 and JS in general,
it is likely that the sourcemap generated by TypeScript 4.7 needs some adjustments.
π» Code
The referenced code unpartial
is here: https://github.com/unional/unpartial
It is build with sourceMap: true
in tsconfig.json
Since this is related to how the code is build and consumed, I don't have a minimal repro for this.
But the library I chose to demo this are simple enough that should be simple enough.
π Actual behavior
Unable to consume the source map generated by TypeScript library using TS 4.7
π Expected behavior
Should work, as shown in this branch: https://github.com/unional/tersify/tree/webpack-old