Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tell RequireJS to not minify a file

How can I use grunt-contrib-requirejs config OR even r.js Config to not minify specific files.

I can disable minification for all files with optimize: 'none' option. But I don't know how to disable it for a single file.

  options: {                                        
      // Do not minify these files: 
      // 'jquery'
      optimize: 'none', // disables minification for all files
    }

I still want the file to be included in the final merged file (unlike empty: http://requirejs.org/docs/optimization.html#empty ), just not passed into uglify.js

like image 831
basarat Avatar asked Sep 26 '13 05:09

basarat


1 Answers

In the absence of a configuration option to disable minification, I have the file excluded from the merged file generated by requirejs and then manually concatenated.

like image 119
basarat Avatar answered Nov 20 '22 05:11

basarat