I followed the steps in https://angular.io/docs/ts/latest/guide/webpack.html and was able to get it working.
But what I want is to have a separate file per module.
I tried adding a new entry point in webpack.common.js for each module but it returns an error when building the app.
module.exports = {
entry: {
'polyfills': './src/polyfills.ts',
'vendor': './src/vendor.ts',
'app': './src/main.ts',
'test': './src/app/test/test.module.ts'
}
.....
}
Is there a way to achieve this?