Background
When the browser can't find the source file in the sourcesContent field (i.e. it's null), it tries to load it from the same base url it downloaded the sourcemap from.
Currently only the sourcemap JSON can be extracted from the lib via its public API. However having access to the list of sources on the implementor side can be used to dynamically serve the files when requested by the browser.
API
Add new instance method to WASM with the following signature
pub fn get_sources(&self) -> Vec<String> {}
Note: The returned Vec not necessarily contains valid paths, so the String type is chosen here. It should be the responsibility of the implementor to resolve these fragments to actual file paths.
Success
- The proposed new method can be called on a WASM instance
- There is at least one test case covering this new method
Background
When the browser can't find the source file in the
sourcesContentfield (i.e. it's null), it tries to load it from the same base url it downloaded the sourcemap from.Currently only the sourcemap JSON can be extracted from the lib via its public API. However having access to the list of sources on the implementor side can be used to dynamically serve the files when requested by the browser.
API
Add new instance method to WASM with the following signature
Note: The returned Vec not necessarily contains valid paths, so the String type is chosen here. It should be the responsibility of the implementor to resolve these fragments to actual file paths.
Success