Skip to main content

ts-loader 2017 retrospective

· 4 min read
John Reilly
OSS Engineer - TypeScript, Azure, React, Node.js, .NET

2017 is drawing to a close, and it's been a big, big year in webpack-land. It's been a big year for ts-loader too. At the start of the year v1.3.3 was the latest version available, officially supporting webpack 1. (Old school!) We end the year with ts-loader sitting pretty at v3.2.0 and supporting webpack 2 and 3.

Many releases were shipped and that was down to a whole bunch of folk. People helped out with bug fixes, features, advice and docs improvements. All of these help.ts-loader wouldn't be where it is without you so thanks to everyone that helped out - you rock!

Profile image of https://github.com/christiantinauer

Profile image of https://github.com/Pajn

Profile image of https://github.com/maier49

Profile image of https://github.com/false

Profile image of https://github.com/roddypratt

Profile image of https://github.com/ldrick

Profile image of https://github.com/mattlewis92

Profile image of https://github.com/Venryx

Profile image of https://github.com/WillMartin

Profile image of https://github.com/Loilo

Profile image of https://github.com/Brooooooklyn

Profile image of https://github.com/mengxy

Profile image of https://github.com/bsouthga

Profile image of https://github.com/zinserjan

Profile image of https://github.com/sokra

Profile image of https://github.com/vhqtvn

Profile image of https://github.com/HerringtonDarkholme

Profile image of https://github.com/johnnyreilly

Profile image of https://github.com/jbrantly

Profile image of https://github.com/octref

Profile image of https://github.com/rhyek

Profile image of https://github.com/develar

Profile image of https://github.com/donaldpipowitch

Profile image of https://github.com/schmuli

Profile image of https://github.com/longlho

Profile image of https://github.com/Igorbek

Profile image of https://github.com/aindlq

Profile image of https://github.com/wearymonkey

Profile image of https://github.com/bancek

Profile image of https://github.com/mredbishop

I'm really grateful to all of you. Thanks so much! (Apologies for those I've missed anyone out - I know there's more still.)

fork-ts-checker-webpack-plugin build speed improvements

Alongside other's direct contributions to ts-loader, other projects improved the experience of using ts-loader. Piotr Oleś dropped his fork-ts-checker-webpack-plugin this year which nicely increased build speed when used with ts-loader.

That opened up the possibility of adding HappyPack support. I had the good fortune to work with webpack's Tobias Koppers and ExtraHop's Alex Birmingham on improving TypeScript build speed further.

So what does the future hold?

ts-loader 4.0 (Live webpack or Die Hard)

The web marches on and webpack gallops alongside. Here's what's in the pipeline for ts-loader in 2018:

Start using the new watch API

A new watch API is being made available in the TypeScript API. We have a PR from the amazing Sheetal Nandi which adds support to ts-loader. Given that's quite a big PR we want to merge that before anything else lands. The watch API is still being finalised but once it lands in TypeScript we'll look to merge the PR and ship a new version of ts-loader.

Drop custom module resolution

Historically ts-loader has had it's own module resolution mechanism in place. We're going to look to move to use the TypeScript mechanism instead. The old module resolution be deprecated but will remain available behind a flag for a time. In future we'll look to drop the old mechanism entirely.

Drop support for TypeScript 2.3 and below

The codebase can be made simpler if we drop support for older versions of TypeScript so that's what we plan to do with our next breaking changes release.

webpack v4 is in alpha now

If any changes need to happen to ts-loader to support webpack 4 then they will be. Personally I'm planning to help out with fork-ts-checker-webpack-plugin as there will likely be some changes required there.

contextAsConfigBasePath will be replaced with a context

The option that landed in the last month doesn't quite achieve the aims of the original PR's author Christian Tinauer. Consequently it's going to be replaced with a new option. This is queued up and ready to go here.

reportFiles option to be added

Michel Rasschaert is presently working on adding a reportFiles option to ts-loader. You can see the PR in progress here.

Merry Christmas!

You can expect to see the first releases of ts-loader 4.0 in 2018. In the meantime, I'd like to wish you Merry Christmas and a Happy New Year! And once more, thanks and thanks again to all you generous people who help build ts-loader. You're wonderful and so I'm glad you do what you do... joyeux Noel!