Webpack Plugin
If you use Webpack as your module bundler, you can use the generate license file webpack plugin. This plugin uses generate license file as part of your webpack build pipeline to automatically generate your third party licenses file as an asset of the project.
Installation
npm install --save-dev generate-license-file-webpack-plugin