Put docx in a seperate namespace in the browser version rather than the global namespace

This commit is contained in:
Dolan Miu
2019-10-12 22:16:36 +01:00
parent 50911fff57
commit 75cdae1473
2 changed files with 17 additions and 15 deletions

View File

@ -9,6 +9,7 @@ module.exports = {
path: path.resolve("build"),
filename: "index.js",
libraryTarget: "umd",
library: "docx",
},
resolve: {
@ -24,15 +25,16 @@ module.exports = {
},
// For coverage testing
...(process.env.NODE_ENV !== "production"
? [{
test: /\.(ts)/,
include: path.resolve("src"),
loader: "istanbul-instrumenter-loader",
enforce: "post",
exclude: [/node_modules/],
}]
: []
)
? [
{
test: /\.(ts)/,
include: path.resolve("src"),
loader: "istanbul-instrumenter-loader",
enforce: "post",
exclude: [/node_modules/],
},
]
: []),
],
},