I have setup an angular 2 version rc5 with webpack project. I am trying to add some extras like a lib.ts (for custom libraries not angular dependant) and redirect.html page which will be used as a callback page by third party for authentication (say Dropbox). so my webpack.common.js now looks like
entry: {
'polyfills': './src/polyfills.ts',
'vendor': './src/vendor.ts',
'app': './src/main.ts',
'lib': './src/lib.ts'
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: ['app', 'lib', 'vendor', 'polyfills']
}),
new HtmlWebpackPlugin({
filename:'index.html'
template: 'src/index.html'
}),
new HtmlWebpackPlugin({
filename:'dropbox.html'
template: 'src/redirect.html',
excludeChunks:['app']
})
]
This redirect page is just a normal page (not an angular page) which captures access_token using lib.ts and lib.ts is also used by angular as a service which pretty much wraps libs.ts.
Now i want to add a script tag or file only for redirect.html and not for angular or index.html how do i do that? Is there an example which deals with two or more separate html files with some common js includes mixed with some unique html specific js files?