3

I am using google closure compiler to compress all the javascript into single file.

While compliance it give lot of warning messages.In my case I have already compressed third party JS files, Which causes complete file to be printed on browser (i saw build progress in browser) for a single error. I cannot modify third party js due to licenses issue.

I am getting tons of warning messages with complete code in browser window, which causes browser to be hanged.

How can I suppressed all the warnings for particular file.

Chad Killingsworth
  • 14,360
  • 2
  • 34
  • 57
Pavan Tiwari
  • 3,077
  • 3
  • 31
  • 71

1 Answers1

4

Use the --hide_warnings_for=node_modules/somelibrary flag.

Chad Killingsworth
  • 14,360
  • 2
  • 34
  • 57
  • I am not using node.js or any node modules, There are bunch of files which i am passing to closure to create single file. How can i specify any specific file name to ignore. – Pavan Tiwari Dec 07 '17 at 07:10
  • Finally i have used --warning_level=QUIET to suppressed all the warning. – Pavan Tiwari Dec 07 '17 at 10:49
  • Doesn't really need saying, of course, but this works, and also works with the npm google-closure-compiler options object. – HeyHeyJC Jul 26 '18 at 19:13