Skip to content

Commit

Permalink
Merge pull request #7184 from byzyk/fix/allow-array-in-lib-root
Browse files Browse the repository at this point in the history
fix: allow array of strings for `output.library.root`
  • Loading branch information
sokra committed May 12, 2018
2 parents 9337295 + 71b05f9 commit d5a648b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
9 changes: 8 additions & 1 deletion schemas/WebpackOptions.json
Expand Up @@ -492,7 +492,14 @@
"properties": {
"root": {
"description": "Name of the property exposed globally by a UMD library",
"type": "string"
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/definitions/common.arrayOfStringValues"
}
]
},
"amd": {
"description": "Name of the exposed AMD library in the UMD",
Expand Down
3 changes: 3 additions & 0 deletions test/configCases/library/umd-array/index.js
@@ -0,0 +1,3 @@
it("should run", function() {

});
10 changes: 10 additions & 0 deletions test/configCases/library/umd-array/webpack.config.js
@@ -0,0 +1,10 @@
module.exports = {
output: {
libraryTarget: "umd",
library: {
root: ["test", "library"],
amd: "test-library",
commonjs: "test-library"
}
}
};

0 comments on commit d5a648b

Please sign in to comment.