ericclemmons / grunt-angular-templates

Grunt build task to concatenate & pre-load your AngularJS templates
MIT License
710 stars 107 forks source link

usemin option uglifyjs error "Maximum call stack size" #123

Open vijeetgv opened 9 years ago

vijeetgv commented 9 years ago

Hi, when I try the usemin option it seems to be failing: Gruntfile code:

ngtemplates:  {
      app: {
        src: '<%= yeoman.app %>/templates/**/*.html',
        dest: '.tmp/templates.js', 
        options:  {
          htmlmin:  '<%= htmlmin.dist %>',
          url:    function(url) { return url.replace('.html', ''); },
          module: 'mpoApp'
          usemin: 'scripts\\scripts.js'
        }
      }
    },

Error:

Running "uglify:generated" (uglify) task
[RangeError: Maximum call stack size exceeded]
>> Uglifying source .tmp/concat/scripts/scripts.js failed.
Warning: Uglification failed.
Maximum call stack size exceeded.
 Use --force to continue.

Aborted due to warnings.
arnorhs commented 8 years ago

i have the same issue. did you ever end up figuring it out @vijeetgv ?

vijeetgv commented 8 years ago

No, I skipped the on-the-fly usemin part & did it in 2 stages i.e. first grunt-react-templates & then usemin on the generated files. The *.rt.js files we can simply generate in the src folder itself (or maybe a subfolder, as desired) & then usemin them whenever we wish to build it to www.