Custom script tag in index.html is removed on each build in Ionic 2 RC.0

Hi there, I’m rebuilding my Ionic 2 app to work in the RC.0 and I’m having an issue with Charts.js. I’m using the ng2-chartjs2 module which works well, but it also needs the Charts.js 2.0 library also included in the index.html. I can easily add it in a script tag in index.html - and it works - but on every build it disappears. I presume this is because rollup is re-writing the index.html file on each build and removing the script tag.

How can I get around this? Do I need to configure the rollup build stage to include the Chart.js library? If so, how do I achieve this?

Thanks in advance,

1 Like

For anyone else who has this issue - the fix was to simply edit the index.html in src/index.html, the run the build process again. It’s then copied to www/index.html

1 Like

I put the custom in the index.html in src/index.html and ran the build process again. But it did not copy to www/index.html.

1 Like

@ianpinto_vamaship Try to delete the www folder before running the build process.