Niklas Mischkulnig

Results 520 comments of Niklas Mischkulnig

To actually support this, `@babel/parser` would have to do something like ```js node.loc = this.inputSourceMap.originalPositionFor(this.state.currentPosition) ``` instead of ```js node.loc = this.state.currentPosition ``` This is probably much slower than merging...

That seems to work without too many changes... https://github.com/babel/babel/compare/main...mischnic:parser-inputSourceMap

> Would you accept a PR I'm not a member of the Babel team, so I'd be interested to know that as well... > Also, I assume it wouldn't be...

At least this step: ``` const astCombined = t.program( [ ...ast2A.program.body, ...ast2B.program.body ] ); ``` should be equivalent to adding the sourcemap of the second file to the first one...

> This may also require upgrading some libraries (e.g. react-transition-group?). Updating and moving to this pattern of passing a ref to `` so that it doesn't use `findDOMNode` anymore: https://github.com/reactjs/react-transition-group/blob/master/CHANGELOG.md#440-2020-05-05

Once case that I found was where we serialize/deserialize an entry of `process.env` (so `{key: "foo", value: process.env["foo"]}`) and then check if `deserialized.value !== process.env.foo` (and this breaks if the...

One solution would of course be to fix TSC/Babel/swc to instead do something using `/*@__PURE__*/` ```js var Rec = /*@__PURE__*/ (function (Rec) { Rec[Rec["A"] = 123123] = "A"; Rec[Rec["B"] =...

@evanw Great to hear that this is working without problems in esbuild! I might try to change this for swc and Babel. Related Babel issue: https://github.com/babel/babel/issues/9268 swc issue: https://github.com/swc-project/swc/issues/4453

You might need https://github.com/calvinmetcalf/rollup-plugin-node-builtins

You should be able to solve this specific error by bumping the version of the Babel packages: https://github.com/babel/babel/issues/11615#issuecomment-634208133