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.
69 posts tagged with "typescript"
View All TagsThe TypeScript webpack PWA
So, there you sit, conflicted. You've got a lovely build setup; it's a thing of beauty. Precious, polished like a diamond, sharpened like a circular saw. There at the core of your carefully crafted setup sits webpack. Heaving, mysterious... powerful.
TypeScript Definitions, webpack and Module Types
A funny thing happened on the way to the registry the other day. Something changed in an npm package I was using and confusion arose. You can read my unfiltered confusion here but here's the slightly clearer explanation.
TypeScript + webpack: Super Pursuit Mode
Dynamic import: I've been awaiting you...
One of the most exciting features to ship with TypeScript 2.4 was support for the dynamic import expression. To quote the release blog post:
TypeScript: Spare the Rod, Spoil the Code
I've recently started a new role. Perhaps unsurprisingly, part of the technology stack is TypeScript. A couple of days into the new codebase I found a bug. Well, I say I found a bug, TypeScript and VS Code found the bug - I just let everyone else know.
But you can't die... I love you!
That's how I was feeling on the morning of October 6th 2016. I'd been feeling that way for some time. The target of my concern? ts-loader. ts-loader is a loader for webpack; the module bundler. ts-loader allows you use TypeScript with webpack. I'd been a merry user of it for at least a year or so. But, at that point, all was not well in the land of ts-loader. Come with me and I'll tell you a story...
TypeScript 2.0, ES2016 and Babel
TypeScript 2.0 has shipped! Naturally I'm excited. For some time I've been using TypeScript to emit ES2015 code which I pass onto Babel to transpile to ES "old school". You can see how here.
The Ternary Operator <3 Destructuring
I'm addicted to the ternary operator. For reasons I can't explain, I cannot get enough of:
Understanding webpack's DefinePlugin (and using with TypeScript)
I've been searching for a way to describe what the DefinePlugin actually does. The docs say:
Define free variables. Useful for having development builds with debug logging or adding global constants.
Creating an ES2015 Map from an Array in TypeScript
I'm a great lover of ES2015's Map
. However, just recently I tumbled over something I find a touch inconvenient about how you initialise a new Map
from the contents of an Array
in TypeScript.
Visual Studio, tsconfig.json and external TypeScript compilation
TypeScript first gained support for tsconfig.json
back with the 1.5 release. However, to my lasting regret and surprise Visual Studio will not be gaining meaningful support for it until TypeScript 1.8 ships. However, if you want it now, it's already available to use in beta.
Definitely Typed Shouldn't Exist
I'm a member of the Definitely Typed team - and hopefully I won't be kicked out for writing this. My point is this: .d.ts
files should live with the package they provide typing information for, in npm / GitHub etc. Not separately.
Hey tsconfig.json, where have you been all my life?
Sometimes, you just miss things. Something seismic happens and you had no idea. So it was with tsconfig.json
.
TypeScript: In Praise of Union Types
(& How to Express Functions in UTs)
Have you heard the good news my friend? I refer, of course, to the shipping of TypeScript 1.4 and my favourite language feature since generics.... Union Types.
Using Gulp in Visual Studio instead of Web Optimization
Caching and Cache-Busting in AngularJS with HTTP interceptors
Loading On-Demand and Caching
Journalling the Migration of Jasmine Tests to TypeScript
I previously attempted to migrate my Jasmine tests from JavaScript to TypeScript. The last time I tried it didn't go so well and I bailed. Thank the Lord for source control. But feeling I shouldn't be deterred I decided to have another crack at it.
My Unrequited Love for Isolate Scope
I wrote a little while ago about creating a directive to present server errors on the screen in an Angular application. In my own (not so humble opinion), it was really quite nice. I was particularly proud of my usage of isolate scope. However, pride comes before a fall.
AngularJS meet ASP.Net Server Validation
So. You're using AngularJS to build your front end with ASP.Net running on the server side. You're a trustworthy dev - you know that validation on the client will only get you so far. You need to validate on the server.