From 35e48b9b02799d705bd863ff3ce0fcc5f3e95c88 Mon Sep 17 00:00:00 2001 From: zhangjianping Date: Fri, 6 Dec 2019 17:45:33 +0800 Subject: [PATCH] fix: support multiple reference when preset-env modules is commonjs --- src/core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core.js b/src/core.js index 584f7c07..297c8adb 100644 --- a/src/core.js +++ b/src/core.js @@ -112,7 +112,7 @@ module.exports = function core(defaultLibraryName) { } } - addDefault(file.path, path, { nameHint: methodName }); + addSideEffect(file.path, path, { nameHint: methodName }); } else { if (style === true) { addSideEffect(file.path, `${path}/style${ext}`); @@ -121,7 +121,7 @@ module.exports = function core(defaultLibraryName) { } } } - return selectedMethods[methodName]; + return Object.assign({}, selectedMethods[methodName]); } function buildExpressionHandler(node, props, path, state) {