cordova-minify icon indicating copy to clipboard operation
cordova-minify copied to clipboard

Node modules not being picked up

Open axedre opened this issue 9 years ago • 1 comments

Hi, on windows (don't know if it happens on other OS's, but I guess not) minify.js halts on account of not finding module uglify.js (if I swap lines var UglifyJS = require('uglify-js'); var CleanCSS = require('clean-css'); it will complain it doesn't find clean-css). I'm guessing this is due to the fact it searches for the modules inside the hooks/after_prepare folder, and it can't find them: I suggest you change that to:

var UglifyJS = require(path.join("..", "..", "node_modules", "cordova-minify", "node_modules", 'uglify-js'));

(same goes for the clean-css and imagemin dependencies). Cheers.

axedre avatar May 29 '15 13:05 axedre

hey thanks, this worked for me :+1:

Zaxuhe avatar Mar 27 '16 06:03 Zaxuhe