This doesn't do the typescript part of the build yet. Also there is a bit of hackiness left to resolve in a follow-up change.
The previous change did the ES6 transpile, now we add ES5. The sourcemaps are broken, but were also broken previously. We'll address that separately.