Skip to content
Permalink
Browse files

Build: Remove empty define({}) from build output

Fixes gh-1768
Closes gh-1569
  • Loading branch information
dcorb authored and fhemberger committed Dec 9, 2014
1 parent 4c38087 commit 19255559ad1d54e4f7c5754ba3069992ed4257c8
Showing with 3 additions and 1 deletion.
  1. +3 −1 build/tasks/build.js
@@ -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: {
@@ -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 ) ) {

0 comments on commit 1925555

Please sign in to comment.
You can’t perform that action at this time.