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

provide source map for global js #284

Open
mschoch opened this issue Oct 11, 2024 · 1 comment
Open

provide source map for global js #284

mschoch opened this issue Oct 11, 2024 · 1 comment

Comments

@mschoch
Copy link
Contributor

mschoch commented Oct 11, 2024

I'm serving our IIFE builds as fireproof.iife.js and connect.iife.js respecitvely (both are distributed as an index.global.js in their packages).

As currently shipped they contain the following reference (last line in the file):

//# sourceMappingURL=index.global.js.map

I'm assuming that is what the browser is using to try and load the source map from, and failing.

I think there are 2 issues:

  • I don't think we're including the global js map (probably simple fix to include the file, as it is generated)
  • Should we rename this something other than index, as that obviously collides when serving these up in a simple manner, which is how they are most commonly used. If not, is it expected that the consumer would rewrite the source mapping URL?
Screenshot 2024-10-11 at 6 40 55 PM

I'd like to have source mappings for these global js files that work easily out of the box.

@jchris
Copy link
Contributor

jchris commented Oct 12, 2024

we should rename to tokens like fireproof and connect-partykit etc

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

2 participants