M
M
Mo1she2018-08-15 11:56:01
JavaScript
Mo1she, 2018-08-15 11:56:01

How can I make changes to the library file in the node_modules folder?

I am developing a website in Laravel. Installed one js library. In order to check how one function works in this library, I enter the node_modules folder, find this library and enter console.log(...) in the right place. But there are absolutely no effects and no changes. Apparently it's all cached, but where and how. How can I still achieve the result so that my changes are visible?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir, 2018-08-15
@Mo1she

Making edits to a compressed lib is still a perversion
1) You find the lib at https://www.npmjs.com/
2) On its page you find a link to github
3) Fork it into your account
4) Make edits and build the package
5) Put to your project a lib from your github
https://docs.npmjs.com/cli/install
After your pull request has been accepted into the main project or after you have played enough, you delete the lib from the github and install it from the main repository.

1
1c80, 2018-08-23
@1c80

Does it make sense to install a lib from your Github if a pull request is not planned? After all, it still has to be poured in there somehow. Isn't it easier to rebuild the sources in a separate project and just copy the result in the modules node of your project?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question