aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorDavid Corbacho <davidcorbacho@gmail.com>2014-05-01 13:21:34 +0300
committerDave Methvin <dave.methvin@gmail.com>2014-12-04 16:38:00 -0500
commit2c1b556d98da597b0490f204e3561f656987f17c (patch)
tree3395352419a00065b8e7bf851b8fcc82e1f02d5f /build
parentbfd5dab2c6f387dce08e7c153ad0b3854ed971e4 (diff)
downloadjquery-2c1b556d98da597b0490f204e3561f656987f17c.tar.gz
jquery-2c1b556d98da597b0490f204e3561f656987f17c.zip
Build: Remove empty define({}) from build output
Fixes gh-1768 Closes gh-1569
Diffstat (limited to 'build')
-rw-r--r--build/tasks/build.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/build/tasks/build.js b/build/tasks/build.js
index e1cf74118..481a4d8f7 100644
--- a/build/tasks/build.js
+++ b/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 ) ) {