fireproof icon indicating copy to clipboard operation
fireproof copied to clipboard

provide source map for global js

Open mschoch opened this issue 1 year ago • 1 comments

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.

mschoch avatar Oct 11 '24 22:10 mschoch

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

jchris avatar Oct 12 '24 00:10 jchris