News for hackers. Stuff that matters.
Re:TypeScript 2.4 RC by teebot on Monday June 12, 2017 @05:12PM (#14541157)
The await import to lazy load modules is quite impressive. TypeScript goes more and more beyond the compile-to-js promise
Re:TypeScript 2.4 RC by highpixels on Monday June 12, 2017 @05:35PM (#14541325)
Dynamic imports is standards-track JS :) http://2ality.com/2017/01/import-operator.html
Re:TypeScript 2.4 RC by avodonosov on Monday June 12, 2017 @06:38PM (#14541689)
It might be better to have runtime system load code dynamically when necessary, without programmer to care about this, e.g. on first invocation, maybe pre-loading it based on call statistics from previous app runs. People implement this already (I tried this too - https://github.com/avodonosov/pocl)
Re:TypeScript 2.4 RC by antihero on Monday June 12, 2017 @06:36PM (#14541673)
I wonder how to get it all working with webpack? Does it use require.ensure?
Re:TypeScript 2.4 RC by bradleyayers on Monday June 12, 2017 @07:12PM (#14541883)
Webpack 2 supports import()
Re:TypeScript 2.4 RC by johnny_reilly on Tuesday June 13, 2017 @06:01AM (#14543798)
Yup - one of the maintainers of ts-loader here. I haven't had chance to test it yet but I'm pretty confident this should just work with ts-loader (and awesome-typescript-loader as well I should think)
Re:TypeScript 2.4 RC by mercer on Tuesday June 13, 2017 @09:42AM (#14544626)
Hey, can I ask you a quick question (and I understand if you can't respond). I'm using React + TypeScript for some server-side stuff, but because I'm using style-loader/css-loader, I have to use webpack.

Everything works, including sourcemaps, but when I debug using VSCode, setting a breakpoint puts me in a 'read-only' version of the file. It's not a lot of 'work' to switch to the actual file, but long-term it's hella inconvenient.

Is there a way to get VSCode (or another editor) to drop me into the actual file, or is this just a consequence of using webpack?