title: grunt requirejs 'define is undefined'
body: <p>I'm trying to optimize <code>RequireJS</code> using <code>GruntJS</code>, using the <a href="https://github.com/gruntjs/grunt-contrib-requirejs" rel="noreferrer"><code>grunt-contrib-requirejs</code></a> plugin.</p>
  
  <p>The problem is my code works fine before optimizing it, and then after optimizing it, on the console it says <code>Uncaught ReferenceError: define is not defined</code>.</p>
  
  <p>Here's the <code>Gruntfile.js</code></p>
  
  <pre><code>module.exports = function (grunt) {
    grunt.loadNpmTasks('grunt-contrib-requirejs');
  
    grunt.initConfig({
      requirejs: {
          compile : {
              options : {
                name  : 'main',
                baseUrl : ".",
                mainConfigFile : "./main.js",
                out : "./optimized.js",
                preserveLicenseComments: false
             }
          }
  }
    })
  
    grunt.registerTask('default', 'requirejs');
  
  }
  </code></pre>