From 0593d7cd336965842a2bd3198a31c88744a67275 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Mon, 4 Feb 2019 19:09:35 +0800 Subject: [PATCH] fix: cannot read property 'minify' of undefined (#69) --- src/minify.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/minify.js b/src/minify.js index f36990f6..077c5d5a 100644 --- a/src/minify.js +++ b/src/minify.js @@ -1,7 +1,7 @@ /* eslint-disable arrow-body-style */ -import terser from 'terser'; +import { minify as terserMinify } from 'terser'; const buildTerserOptions = ({ ecma, @@ -175,7 +175,7 @@ const minify = (options) => { ); } - const { error, map, code, warnings } = terser.minify( + const { error, map, code, warnings } = terserMinify( { [file]: input }, terserOptions );