npmjhipsterangular2-modules

How to customize code of existing installed module


I am using an Angular2 module which provides me with a custom tag input field (angular2-tag-input module), but I would need some feature in the input the module doesn't provide.

As this feature is quite specific to my project, it wouldn't fit as a pull request for the developer.

So what I would like to do is customize the module locally, how can I do that? I tried changing the code directly in node_modules/blabla/dist/ but it doesn't seem to work... Webpack is detecting my changes (it rebuilds everytime I save the files) but the website content doesn't reflect my changes. Furthermore, this technique wouldn't be compatible with git, as the node_modules are untracked files, specifically installed on each workstation regarding the yarn.lock dependencies file...


Solution

  • This is not a question about angular modules but rather a question about npm modules. There are several ways to do

    First clone locally the git repository of the module you want to customize, make your changes.

    Then to integrate it in your JHipster app, there are few alternatives: