tl;dr
For people transpiling for Node.js: add target: node
to the webpack.config.js
file.
Explanation
I know this is an Angular question but those who are transpiling for Node.js have to keep in mind that by default, Webpack transpiles for browser targets, where you don't have modules provided only by Node.js. If your environment where you will be running the transpiled code is indeed Node.js then just mark it in the config file with target: node
.