Ionic 2/3 modify Index.html

Hello. I want to modify my index.html file when I build my app for development or production.

I need to inject one if is production and other if is development

Actually I use this —>

And this JS

const rollupConfig = require('@ionic/app-scripts/config/rollup.config');
const replace = require('rollup-plugin-replace');

const isProd = (process.env.IONIC_ENV === 'prod');
console.log('✓ ENVIRONMENT IS PRODUCTION: ', isProd);

const rollupConfigReplaceEnviroment = replace({
  exclude: 'node_modules/**',
  // use the /environments/ as the default import(!), no stub needed.
  // note we only replace the "last" part of the import statement so relative paths are maintained
  '/environments/' : ( isProd ? '/environments/' : '/environments/'),

rollupConfig.plugins = rollupConfig.plugins || [];
rollupConfig.plugins.splice(0, 0, rollupConfigReplaceEnviroment);

module.exports = rollupConfig;


@videmort Hi, Did you ever solve this? If so, how (for Ionic 3)?