Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid sourcemap due to missing TS output files in package #97

Open
justingrant opened this issue Nov 13, 2022 · 3 comments
Open

Invalid sourcemap due to missing TS output files in package #97

justingrant opened this issue Nov 13, 2022 · 3 comments
Assignees

Comments

@justingrant
Copy link

justingrant commented Nov 13, 2022

While diagnosing and fixing js-temporal/temporal-polyfill#192, I found that JSBI has the same bug: the package's sourcemap points to files that don't exist in the package. This causes debug console errors in some environments like the VSCode debugger.

For example, here's what I see in the debug console when I run my JSBI-using app in the VSCode debugger:

Could not read source map for file:///Users/[redacted for privacy]/node_modules/jsbi/tsc-out/jsbi.mjs: ENOENT: no such file or directory, open '/Users/[redacted for privacy]/node_modules/jsbi/tsc-out/jsbi.js.map'

The fix that I proposed in js-temporal/temporal-polyfill#193 is to add the tsc-out folder to the package. The lib folder should also be added. I suspect that the same fix may work here too. There may be other fixes possible too.

@mathiasbynens
Copy link
Member

Would you be up for submitting a patch?

@justingrant
Copy link
Author

I'm less confident that I understand the bundler config in this repo than in https://github.com/js-temporal/temporal-polyfill. In particular, I'm not sure how the browser-facing bundles work here, and I was worried that increasing the size of the browser bundle might be bad. So I was thinking that it might be better for someone who knows this repo better (like @12wrigja?) to PR a fix here?

@12wrigja
Copy link
Collaborator

I'll try and find some time this week to send a PR for this (same for Temporal).

@12wrigja 12wrigja self-assigned this Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants