Skip to content

Commit

Permalink
Build: Remove empty define({}) from build output
Browse files Browse the repository at this point in the history
Fixes gh-1768
Closes gh-1569
(cherry picked from commit 2c1b556)
  • Loading branch information
dcorb authored and dmethvin committed Dec 4, 2014
1 parent 404d2aa commit 2138f15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build/tasks/build.js
Expand Up @@ -20,6 +20,8 @@ module.exports = function( grunt ) {
optimize: "none",
// Include dependencies loaded with require
findNestedDependencies: true,
// Avoid inserting define() placeholder
skipModuleInsertion: true,
// Avoid breaking semicolons inserted by r.js
skipSemiColonInsertion: true,
wrap: {
Expand Down Expand Up @@ -81,7 +83,7 @@ module.exports = function( grunt ) {

// Remove empty definitions
contents = contents
.replace( /define\(\[[^\]]+\]\)[\W\n]+$/, "" );
.replace( /define\(\[[^\]]*\]\)[\W\n]+$/, "" );
}
// AMD Name
if ( (amdName = grunt.option( "amd" )) != null && /^exports\/amd$/.test( name ) ) {
Expand Down

0 comments on commit 2138f15

Please sign in to comment.