fireproof-storage / fireproof-storage/fireproof

provide source map for global js

Open
#284 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
973
Forks
58
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the build configuration and package output that produce the IIFE files named fireproof.iife.js and connect.iife.js, then inspect the generated index.global.js.map reference. Verify whether the map files are included with the distributed packages and whether the sourceMappingURL works when the bundles are served under their intended names; done means both global builds load usable source maps out of the box.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.