How to apply fix of later version ionic to previous version in project

Run into a ionic bug in 3.8.
However, solution mentioned not work.
Fix related released in 4.x and I would like to apply it in current project.


  1. Apply / copy code fix to local project
  2. Make ionic a local module to be install instead of official source.
  3. Other uses “npm install” would install the modified node module after pull source

Other Solution:

  1. Make a hook copy the fix each time building the project by replacing line.
    But risk that any mis-replace would crash the project.

Is there a official / recommended way to modify ionic?
(not upgrading ionic)


Apllying code patches from Ionic 4 to Ionic 3 will not be easy, they are really different in the code itself. Just the API the developer uses is similar.

If you just want to fix the problem in 3.x yourself: Fork the ionic-v3 repository that has this code, create a new branch based on the version tag you are using, fix the bug, install from your branch (npm can install from GitHub directly), done.

as the project will be handed over, install from git may not be ok.
can i make it locally?

Huh? Any changes to any codebase should be versioned with git, otherwise you have no idea what you changed.

If you have to hand the project over to someone else, just also transfer the repo with the adaptions.