when uglify code machine produces different minified version of javascript developer. both of our minified code correct different.
for example:
- }) : (a.visible = !1, a.videocss = b > d ? "hideleft" : "hideright"); + }) : (a.visible = !1, b > d ? a.videocss = "hideleft" : a.videocss = "hideright"); verified both using same version of grunt uglify: "version": "0.6.0".
i've ran problem before. remember package.json file specify version of grunt-contrib-uglify use; grunt-contrib-uglify has it's own dependencies. it's possible have inconsistent versions of uglify-js. check this, in root of project (where package.json file is) type:
npm list | grep 'uglify'
the output should like:
├─┬ grunt-contrib-uglify@0.9.1 │ ├─┬ uglify-js@2.4.23 │ │ ├── uglify-to-browserify@1.0.2 a technique locking down sub dependencies of top level dependencies using npm shrinkwrap. generate file called npm-shrinkwrap.json recursively scans node_modules directory , defines dependencies , sub-dependencies , specific versions. in case, command like
npm shrinkwrap --dev
now, when else runs npm install - should same versions each dependency , sub-dependencies.
Comments
Post a Comment