Hi, I have been using esm for half a year for a node project, it has been working really great. But just recently the sourcemaps stopped working, I think that it had to do with chrome being updated.
I've created a repro repo
https://github.com/cjh9/esm-sourcemaps-broken/
So basically I can see the raw file main.js and test.js but when I try to put a breakpoint I get redirected to an empty file. Also I tried to turn off the sourcemaps with
ESM_OPTIONS={'cjs':{'paths':true},'sourceMap':false} NODE_PATH=./ node --inspect -r esm main.js
but the inline sourcemaps are still there...
Thanks @jdalton, but what about turning off the sourcemaps and debug in the raw code? Is it the correct way to specify the sourceMap option like this, ESM_OPTIONS={'cjs':{'paths':true},'sourceMap':false} NODE_PATH=./ node --inspect -r esm main.js?
When I run it like this I still get the inline sourcemap-string at the bottom of the file...
At the moment --inspect trumps the sourceMap option.
Let me change that to respect a value of false.
Update:
Patch https://github.com/standard-things/esm/commit/8558ba7bbeac028db7ee77754b2898b5811a9050;
Update:
esm v3.2.19 is released :tada:
@jdalton super great, it works! Also, when regular sourcemaps start working again (hoping they fix the bug) is it possible to mark the raw file with a tag or something in the filename, or that it is removed completely? Right now the raw and the sourcemapped are side by side, but it's hard to know which one is which. Preferably so that the sourcemapped file turn up first in the list.


Most helpful comment
Hi @cjh9!
Yep, it's a Chrome bug. I filed Chromium bug #941035.
_(Please sign-in and 猸愶笍 it.)_
They said, it looks related to Chromium bug #941697 too.