forked from webpack/webpack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ConcatenatedModule): don't throw on arrays with empty values
Fixes webpack#6407 Fixes webpack#5415 Ref angular/angular#21809
- Loading branch information
Showing
4 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
function foo(n) { | ||
return 'bar'; | ||
} | ||
export default [, foo]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
function foo(n) { | ||
return 'bar'; | ||
} | ||
export default [, foo]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import importOne from './import-one'; | ||
import importTwo from './import-two'; | ||
|
||
it("should concatenate modules default exports and empty array values", function() { | ||
importOne.length.should.be.eql(2); | ||
(typeof importOne[0]).should.be.eql('undefined'); | ||
(typeof importOne[1]).should.be.eql('function'); | ||
importTwo.length.should.be.eql(2); | ||
(typeof importTwo[0]).should.be.eql('undefined'); | ||
(typeof importTwo[1]).should.be.eql('function'); | ||
}); |