dont run coverage if publishing

This commit is contained in:
Joe Fitter
2019-02-08 12:04:17 +00:00
parent 83a7f4664d
commit a6077b8f16
2 changed files with 12 additions and 9 deletions

View File

@ -22,14 +22,17 @@ module.exports = {
test: /\.ts$/,
loaders: ["awesome-typescript-loader"],
},
{
// For coverage testing
test: /\.(ts)/,
include: path.resolve("src"),
loader: "istanbul-instrumenter-loader",
enforce: "post",
exclude: [/node_modules/],
},
// For coverage testing
...(process.env.NODE_ENV !== "production"
? [{
test: /\.(ts)/,
include: path.resolve("src"),
loader: "istanbul-instrumenter-loader",
enforce: "post",
exclude: [/node_modules/],
}]
: []
)
],
},