From ea8e62b6966f67bb0f1bd3e4490cfb6547502d24 Mon Sep 17 00:00:00 2001 From: MiaoWoo Date: Mon, 2 Mar 2020 10:34:30 +0800 Subject: [PATCH] feat: optimize decompression Signed-off-by: MiaoWoo --- src/main/resources/core/require.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/core/require.js b/src/main/resources/core/require.js index 333d053..31fab74 100644 --- a/src/main/resources/core/require.js +++ b/src/main/resources/core/require.js @@ -271,7 +271,7 @@ // @ts-ignore var entry; var target = root + separatorChar + 'node_modules' + separatorChar + module_name; while ((entry = tis.getNextEntry()) != null) { - var targetPath = Paths.get(target + separatorChar + entry.getName().substring('package/'.length)); + var targetPath = Paths.get(target + separatorChar + entry.getName().substring(8)); targetPath.toFile().getParentFile().mkdirs(); Files.copy(tis, targetPath, StandardCopyOption.REPLACE_EXISTING); }