Issue with webpack-sources shipped with Ionic v2

My question/issue is better described here.

The eventual fix to the issue was that I had to go into node_modules/webpack-sources/node_modules/source-map/lib/source-node.js and insert a temporary fix.

I had to change :

var nextLine = remainingLines[0]

…to…

var nextLine = remainingLines[0] || ‘’;

This is a far from ideal solution as I should not have to mess around in node_modules at all.

There should be enough information on the error in the SO question linked.

Can anyone please identify what the error is down to (i.e. Ionic, webpack, angular) and suggest a more permanent and ideal fix?