standard-things / esm

Tomorrow's ECMAScript modules today!
Other
5.26k stars 146 forks source link

Node 11.12.0 ESM mangling line numbers #785

Closed CodeOtter closed 5 years ago

CodeOtter commented 5 years ago

My package.json has the following entries

  "esm": {
    "cjs": true,
     sourceMap: true
  },
  "ava": {
    "require": [
      "esm"
    ]
  },

When I run ava, errors return extreme wrong line numbers.

No .babelrc exists. No other configuration override exists.

I did not have this problem a week ago. :( I moved to ESM from Babel so I could get away from the utter insanity that is permanently-alpha transpiling and endlessly mangled line numbers, but alas, it found me here, too :(

CodeOtter commented 5 years ago

Aha! This is a problem between the interaction of nyc, esm, and ava

Going to close ticket, but leave it here in case some poor soul stumbles across this problem in the future!

jdalton commented 5 years ago

How did you solve the issue?

CodeOtter commented 5 years ago

I didn't and, instead, I've opened up a new request for #790 to allow user overrides of .terserrc to turn off compress and mangle