From d709133bc8d1b6848493b2e806f4648a49341e81 Mon Sep 17 00:00:00 2001 From: guybedford Date: Wed, 5 Dec 2018 18:35:27 +0200 Subject: [PATCH] fix minify flag --- src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 732a0f19..02c3ec17 100644 --- a/src/index.js +++ b/src/index.js @@ -111,12 +111,13 @@ module.exports = async ( use: [{ loader: __dirname + "/loaders/ts-loader.js" }] }, { + ...minify ? [{ test: /\.(js|mjs)$/, use: [{ loader: __dirname + "/loaders/terser-loader.js", options: { sourceMap } }] - } + }] : [] ] }, plugins: [