News for hackers. Stuff that matters.
Re:PR converts the Three.js codebase to ES2015 modules by superswordfish on Saturday July 23, 2016 @11:48AM (#12149803)
I wonder what justifies turning normal code into a string to eval():

https://github.com/mrdoob/three.js/pull/9310/files#diff-2ac7...

becomes

https://github.com/mrdoob/three.js/pull/9310/files#diff-ff6e...

On the surface it seems bad.

Re:PR converts the Three.js codebase to ES2015 modules by rich_harris on Saturday July 23, 2016 @11:32PM (#12152113)
AudioContext is a special case – unlike most of the THREE.* exports, THREE.AudioContext is a getter (which initializes a Web Audio context). ES module namespaces can't have getters, so for backwards compatibility in the generated UMD bundle it was necessary to add that snippet to the bottom.
Re:PR converts the Three.js codebase to ES2015 modules by espadrine on Saturday July 23, 2016 @11:56AM (#12149835)
This does not look like an eval. It seems to be a script that generates a JS file. The string is not eval'ed, it is concatenated.
Re:PR converts the Three.js codebase to ES2015 modules by superswordfish on Saturday July 23, 2016 @12:05PM (#12149882)
Good point, either way it is ugly that normal code is now a string. It is in rollup.config.js so maybe this is imposed by "Rollup", but I'm not about to go find how the "outro" option differs from the "footer" option in yet another JS build tool.