Tonejs / Tone.js

A Web Audio framework for making interactive music in the browser.
https://tonejs.github.io
MIT License
13.39k stars 976 forks source link

Sourcemaps with Tone ESM module in the browser link to TS files #1086

Open giohappy opened 2 years ago

giohappy commented 2 years ago

I'm using Tone both directly as ESM module script in the browser and through Vital bundler. In both cases the browser references the ESM sourcemaps linking to the Typescript files, which of couese break the debugging.

I could only solve this buy rebuilding tone ESM modules without sourcemaps.

Sourcemaps are useful when navigating Tone source code inside an IDE, but it prevents correct debugging inside a browser. Do you see any solution thar can give both features?

braebo commented 1 year ago

Additionally, the sourcemaps linking to the d.ts files instead of the source files has been counterproductive for us. I often have to manually navigate through node_modules to find the relevant source files, which is a bit cumbersome.