Changing Ionic core files doesn't work

I am using Ionic React (version 5.0.4), and changed the “reorder-group.js” file in the following path, in order to add some features to the <IonReorderGroup> tag:

MyProject\node_modules@ionic\core\dist\collection\components\reorder-group\reorder-group.js

However, when I serve the app ( npm run start ) or build it ( npm run build ) there is no change.

Why is it happening and how can I solve it? (maybe it has something to do with cache files or anything similar?:thinking:)

Thanks in advance!

You should not be modifying files in node_modules. These are compiled files that are split up into different versions for different environments. An edit in one file does not mean it is handled through out the package.

This should not be done.

To build on @mhartington’s excellent advice above, local modifications to files under node_modules won’t survive across times you update other dependencies, and won’t replicate when you rebuild the app in a different environment. If you absolutely positively have to modify things, look into using npm link or even better fork the repository and make a pull request so that everybody can share in your improvements.