Uh oh!
There was an error while loading. Please reload this page.
Add option to initialize mappings wasm via ArrayBuffer - #339
Conversation
Pull Request Test Coverage Report for Build 491
💛 - Coveralls |
fitzgen
left a comment
There was a problem hiding this comment.
Oh wait -- before we merge this, can you add a small test for initializing with an array buffer? Thanks!
rtsao
commented
May 29, 2018
I was going to, but with the existing test tooling, there's no way to write a test for this because Do you have an opinion regarding how browser testing should be done? |
fitzgen
commented
May 29, 2018
Bleh, I overlooked that. We would need some kind of headless browser testing setup. If you want to dig into adding that, please be my guest :) In the meantime, we can just merge this. Thanks again! |
fitzgen
commented
May 29, 2018
Can you rebase this branch on master? |
rtsao
commented
May 29, 2018
Just did, thanks! 😄 |
This PR adds the ability to directly pass in the mappings wasm into
SourceMapConsumer.initialize. This is needed for browser usage without needing to make a request (e.g. needing to work around CSP restrictions).Example
I didn't implement this because it would be a breaking change, but I think a better alternative API might be something like: