I know I have seen examples like this around the Internet. I have one under development here, but it will be at least a few more weeks before we get it published in full. But I can find a fragment for you and paste it below. This is a webpack config - it works, we have already used it in a Angular 2 class. Hopefully it helps.
module.exports = {
context: __dirname + "/www",
entry: "./app/app",
output: {
path: __dirname + "/www", filename: "bundle.js"
},
resolve: {
extensions: ['', '.js', '.ts']
},
module: {
loaders: [{
test: /\.ts/, loaders: ['ts-loader'], exclude: /node_modules/
}]
}
};
Kyle