From de797ede64acffe91c9bd46bd7daa3dc122a8b32 Mon Sep 17 00:00:00 2001 From: ximing Date: Sun, 4 Aug 2019 01:16:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8E=BB=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E7=9A=84ts=E5=BC=95=E7=94=A8=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugin/handleJSDep.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/plugin/handleJSDep.js b/src/plugin/handleJSDep.js index fb3fde9..8dbbe6e 100644 --- a/src/plugin/handleJSDep.js +++ b/src/plugin/handleJSDep.js @@ -50,15 +50,9 @@ module.exports = class HandleJSDep { try { libPath = resolve.sync(path.join(asset.dir, lib)); } catch (e) { - try { - libPath = bresolve.sync(lib, { - basedir: mpb.src - }); - } catch (e) { - libPath = resolve.sync(`${lib}.ts`, { - basedir: mpb.cwd - }); - } + libPath = bresolve.sync(lib, { + basedir: mpb.src + }); } }