Files
Donny/강동윤andGitHub 78d64a60d0 chore: Inline swc-sourcemap (#11575)
## Summary
- move inlined `swc_sourcemap` into `crates/swc_sourcemap`
- keep only source-oriented files (`Cargo.toml` + `src/**`), removing
docs/tests/examples/CI scripts from the imported repository snapshot
- wire workspace dependency directly via path in root `Cargo.toml`
- remove previous `vendor` patch override

## Notes

I'm doing this because I want to implement the source map scoping
proposal
2026-02-23 10:48:47 -08:00
..
2026-02-23 10:48:47 -08:00
2026-02-23 10:48:47 -08:00
2026-02-23 10:48:47 -08:00

The sourcemap here was generated like this:

Basically this is the same that the react-native gradle file does, see: https://github.com/facebook/react-native/blob/4185a45be40e014d5e6315c70de00fe5f76c726a/react.gradle#L156-L204

    $ npx react-native bundle --platform android --entry-file input.js --bundle-output intermediate.js --sourcemap-output intermediate.js.map
    $ hermes -O -emit-binary -output-source-map -out=intermediate2 intermediate.js
    $ node react-native/scripts/compose-source-maps.js intermediate.js.map intermediate2.map -o output.map

When running the bytecode, we will get the following stacktrace (probably a bit different when done in react-native properly):

Error: lets throw!
    at foo (address at unknown:1:11939)
    at anonymous (address at unknown:1:11857)
    at loadModuleImplementation (address at unknown:1:2608)
    at guardedLoadModule (address at unknown:1:1973)
    at metroRequire (address at unknown:1:1494)
    at global (address at unknown:1:508)