How to modify composer.js file into the plugin directory

You should use the javascript plugin API. If you explain what you’re trying to achieve, I’m sure we can work out the best API method to use.