I am currently utilizing Webpack to compile my assets for a Chrome Extension. Typically, within the /dist
directory, there would be various JS files, HTML files, and the essential manifest.json
.
In the past, I had this file generated elsewhere and then utilized the 'copy-webpack-plugin'
to copy it over to the /dist
folder, similar to the method shown here:
https://i.sstatic.net/C6aQ8.jpg
However, I now find myself in need of dynamically generating the manifest.json
. This requires making an AJAX request to fetch necessary data for the manifest.json
, creating the file, and then placing it within the /dist
directory.
While I have experience with Node.js and know how to obtain data through AJAX, bridging this Node.js application with my existing Webpack build process is where I am encountering uncertainty. Is a plugin necessary for this task?
Your assistance on resolving this matter will be greatly appreciated. The version of Webpack that I am using is "webpack": "^3.0.0"
.