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:48:28 -0500
commit2138f158be66dc2c6c3578dda413908d11aec675 (patch)
tree535f482e2b66fe3adf77b31e7e4339a448f9c9ed /build
parent404d2aa269e87bc952691a2ad833493e3585e543 (diff)
downloadjquery-2138f158be66dc2c6c3578dda413908d11aec675.tar.gz
jquery-2138f158be66dc2c6c3578dda413908d11aec675.zip
Build: Remove empty define({}) from build output
Fixes gh-1768 Closes gh-1569 (cherry picked from commit 2c1b556d98da597b0490f204e3561f656987f17c)
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 caec8f153..199f78120 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 ) ) {