uglifyjs-folder is not rewriting every time

21 Views Asked by At

I have different js files in in my js folder, using uglify (npm) can minify my code and creating the new js files using the following comments "uglifyjs-folder ./js -o ./js/scripts.js" Problem which I facing its not working every time then need to be delete the existing file and run the command again. How to rewrite the file without deleting the file.

Some scenario given below, in the given code if I change the string, this will minify without deleting the existing file.
Scenario 1:


function getCurrencyTypes() {
            var restAPIUrl1 = '';
            return get(restAPIUrl1 + 'project/currency');
        }

Scenario 2:


In the above code change restAPIUrl1 to something then it won't minify the code, In this situation need to be delete the existing file and retry

How we can resolve this issue?

0

There are 0 best solutions below