Esm: Sourcemaps stopped working on latest chrome

Created on 16 Mar 2019  路  5Comments  路  Source: standard-things/esm

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...

question

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.

All 5 comments

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.

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.

sm1

sm2

@cjh9

You should file another bug on them to make that more clear too.
Please post a link here if/when you do

Update:

It looks like the fix to Chromium bug #941697 fixed the Chromium bug #941035 I filed in latest Canary.

Was this page helpful?
0 / 5 - 0 ratings