cordova-minify
cordova-minify copied to clipboard
Node modules not being picked up
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.
hey thanks, this worked for me :+1: