Allow array as value in externals object.
Fixes https://github.com/webpack/webpack/issues/8041.
This commit is contained in:
parent
2f78aae8d8
commit
3aef0e5844
|
@ -123,6 +123,9 @@
|
|||
{
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/common.arrayOfStringValues"
|
||||
},
|
||||
{
|
||||
"type": "boolean"
|
||||
}
|
||||
|
|
|
@ -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"]
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue