I am using Grunt related to the grunt-contrib-uglify to minimize JavaScript in my application.
After minimizing it, it removes every 'use strict' statement except the very first, so I get a huge JavaScript file with the 'use strict' directive on top.
The problem is that the global 'use strict' directive causes the browser to execute the code of each lib that I use in the project in "strict mode" and causes errors, since not every third-party code is written for strict mode.
Any ideas on how to solve this?
javascript gruntjs bundling-and-minification uglifyjs
Roman kolpak
source share