f5 / unovis

Modular data visualization framework for React, Angular, Svelte, Vue, and vanilla TypeScript or JavaScript
https://unovis.dev
Apache License 2.0
2.27k stars 44 forks source link

Support Sourcemaps for Dev #456

Open curran opened 1 month ago

curran commented 1 month ago

As a newcomer to the Unovis codebase, I want to be able to know the file and line number from which an error originated, so that I can figure out the cause.

Current behavior: in npm run dev, there seems to be no sourcemaps configured, so when an error occurs, it resolves to bundle.js, which is useless. Example:

image

Desired behavior: in npm run dev, the environment leverages sourcemaps to tell you where the error is coming from.

curran commented 1 month ago

But overall, the source maps don't seem to be working.

For example, when I add this change:

image

I get this error:

image

The source maps don't seem to be doing their job. Instead of bundle.js it should resolve to the specific line number and source file, but it does not.