Skip to content
This repository was archived by the owner on Oct 9, 2020. It is now read-only.

Commit 79b718c

Browse files
committed
update default interop\
1 parent f775867 commit 79b718c

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

plugin-babel.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,9 @@ exports.translate = function(load, traceOpts) {
100100
plugin = typeof plugin == 'string' ? plugin : Array.isArray(plugin) && typeof plugin[0] == 'string' && plugin[0];
101101
if (!plugin)
102102
return;
103-
pluginAndPresetModuleLoads.push(
104-
pluginLoader.normalize(plugin, module.id)
105-
.then(function(normalized) {
106-
return pluginLoader.load(normalized)
107-
.then(function() {
108-
return pluginLoader.get(normalized)['default'];
109-
});
110-
})
111-
);
103+
pluginAndPresetModuleLoads.push(pluginLoader.import(plugin, module.id).then(function (m) {
104+
return m.default || m;
105+
}));
112106
});
113107

114108
return Promise.all(pluginAndPresetModuleLoads)

0 commit comments

Comments
 (0)