I am trying to copy a single file from the src location to the "www" output folder. I then want to incorporate this into the build process so that after all the core build scripts are run, it runs my command.
I am following the examples in the App Build Scripts for Ionic. Basically I have:
Added a new config file with my command (as per this example): config\webpack_rj.config.js
module.exports = {
copyIndexContent: {
src: ['{{SRC}}/web.config'],
dest: '{{WWW}}'
}
}
In my package.json I have added:
"config": {
"pwa_copy_webconfig": "./config/webpack_rj.config.js"
},
This is the part I do not understand - how to actually run it when I run the normal build process.
I have tried added an additional "scripts" entry in the package.json:
"build": "ionic-app-scripts build ./config/webpack_rj.config.js",
However this did not work. So how can I invoke copyIndexContent
or pwa_copy_webconfig
from the build process?