Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed faulty logic related to handling externals when resolver return…
…s false (#2351) * Fixed faulty logic related to handling externals when resolver returns false. * include a test case
- Loading branch information
1 parent
4a5c776
commit cddc570
Showing
3 changed files
with
27 additions
and
1 deletion.
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,23 @@ | ||
var assert = require('assert'); | ||
var path = require('path'); | ||
|
||
module.exports = { | ||
description: 'includes an external module with a false resolve return', | ||
options: { | ||
input: 'main.js', | ||
plugins: [ | ||
{ | ||
resolveId: function(id) { | ||
if (id === './external') | ||
return false; | ||
} | ||
} | ||
] | ||
}, | ||
context: { | ||
require: function(required) { | ||
assert.equal(required, './external'); | ||
return 1; | ||
} | ||
} | ||
}; |
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 @@ | ||
import './external'; |