[SOLVED] What is the functionality of .js files inside node modules folder

Issue

The npm packages are running as usual even if we delete the .js files from the respective node_modules folder. But is there a motive for the .js files yet?
Thanks in advance

Edited To Add:
the javascript files I edit in node_modules are not reflected in webpack in chrome console.
Is there anyway to make them get reflected?
Thanks in advance

Edited to Add:
As of Daniel W., edited js files are of no use and they get transpiled from .ts files
Another question: Is it possible to edit .ts file interfaces? (clarifying the question): Is every interface defined in the node_module itself? or is some of them protected?

Edited To Add:
I am using Angular-CLI. I edited the github project and used

npm run build
npm pack

and did

npm install E:/tmp/package.tgz

The

ng serve

is refreshing the files. But when I run the dist folder, the old js files are not refreshing(been trying this for 3-4 days). I tried

npm cache clean --force

also. How to refresh angular cli output?
Thanks in advance

Solution

I managed to reflect changes in npm install E:/tmp/package.tgz
by changing the ng build
flags. Example, once we run ng build --prod
the changes will reflect again only if we run another flag like ng build --prod --aot=false.
But I have dropped the project and went back to AngularJS since my team leader says he couldn’t understand the Angular 13 language. Thanks for spending your valuable time mates

Answered By – user3103982

Answer Checked By – Marie Seifert (BugsFixing Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *