How to specify wasm source-base-map url (em++) to work with polymer serve (component)

Viewed 574

I have a functional lit-element component which references a WASM module instantiated by an emscripten-generated .js file loaded within index.html.

I would like to specify the <base-url> for a source map during wasm compilation:

em++ next.cpp -I ../../eigen -g4 -s WASM=1 -o next.js --source-map-base <base-url>

such that the source map will be accessible within polymer-cli (serve).

What should the <base-url> be given the default polymer-cli (serve) url:

http://127.0.0.1:8081/components/my_component/

I attempted a referential path to the src directory under the my_component directory without success -- e.g. 'src/'.

Presuming the url is correct, will the generated emscripten .js script incorporate the sourceMappingUrl section within the .wasm file during Module formulation?

0 Answers
Related