mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Build: Remove empty define({}) from build output
Fixes gh-1768
Closes gh-1569
(cherry picked from commit 2c1b556d98
)
This commit is contained in:
parent
404d2aa269
commit
2138f158be
@ -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 ) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user