Use webpack with a development worker that executes NodeJs app. This should be used for development only.
$ npm install webpack-dev-executer
import webpack from 'webpack';
import config from './webpack.config.ts';
import WebpackDevExecuter from 'webpack-dev-executer';
const compiler = webpack(config);
const executer = new WebpackDevExecuter({ writeToDisk: true }, compiler);
executer.startCallback(() => {
console.log('STARTED');
});