Skip to content

Commit d5a648b

Browse files
authored
Merge pull request webpack#7184 from byzyk/fix/allow-array-in-lib-root
fix: allow array of strings for `output.library.root`
2 parents 9337295 + 71b05f9 commit d5a648b

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

schemas/WebpackOptions.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,14 @@
492492
"properties": {
493493
"root": {
494494
"description": "Name of the property exposed globally by a UMD library",
495-
"type": "string"
495+
"anyOf": [
496+
{
497+
"type": "string"
498+
},
499+
{
500+
"$ref": "#/definitions/common.arrayOfStringValues"
501+
}
502+
]
496503
},
497504
"amd": {
498505
"description": "Name of the exposed AMD library in the UMD",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
it("should run", function() {
2+
3+
});
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
output: {
3+
libraryTarget: "umd",
4+
library: {
5+
root: ["test", "library"],
6+
amd: "test-library",
7+
commonjs: "test-library"
8+
}
9+
}
10+
};

0 commit comments

Comments
 (0)