Skip to content

Commit

Permalink
Allow array as value in externals object.
Browse files Browse the repository at this point in the history
Fixes #8041.
  • Loading branch information
RubenVerborgh committed Sep 17, 2018
1 parent 2f78aae commit 3aef0e5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions schemas/WebpackOptions.json
Expand Up @@ -123,6 +123,9 @@
{
"type": "object"
},
{
"$ref": "#/definitions/common.arrayOfStringValues"
},
{
"type": "boolean"
}
Expand Down
10 changes: 10 additions & 0 deletions test/configCases/externals/optional-externals-array/index.js
@@ -0,0 +1,10 @@
it("should not fail on optional externals", function() {
try {
require("external");
} catch(e) {
expect(e).toBeInstanceOf(Error);
expect(e.code).toBe("MODULE_NOT_FOUND");
return;
}
throw new Error("It doesn't fail");
});
@@ -0,0 +1,5 @@
module.exports = {
externals: {
external: ["./math", "subtract"]
}
};

0 comments on commit 3aef0e5

Please sign in to comment.