don't ignore dynamic import specifiers - fixes #633
This commit is contained in:
parent
2e589904c7
commit
00b22b1231
@ -82,8 +82,7 @@ AMDFormatter.prototype.importSpecifier = function (specifier, node, nodes) {
|
|||||||
|
|
||||||
if (contains(this.file.dynamicImported, node)) {
|
if (contains(this.file.dynamicImported, node)) {
|
||||||
// Prevent unnecessary renaming of dynamic imports.
|
// Prevent unnecessary renaming of dynamic imports.
|
||||||
this.ids[node.source.value] = key;
|
this.ids[node.source.value] = ref;
|
||||||
return;
|
|
||||||
} else if (t.isImportBatchSpecifier(specifier)) {
|
} else if (t.isImportBatchSpecifier(specifier)) {
|
||||||
// import * as bar from "foo";
|
// import * as bar from "foo";
|
||||||
} else if (t.isSpecifierDefault(specifier) && !this.noInteropRequire) {
|
} else if (t.isSpecifierDefault(specifier) && !this.noInteropRequire) {
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
define(["exports", "someModule", "6to5-runtime/helpers"], function (exports, _someModule, _to5Helpers) {
|
define(["exports", "someModule", "6to5-runtime/helpers"], function (exports, _someModule, _to5RuntimeHelpers) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
var _to5Helpers = _to5RuntimeHelpers;
|
||||||
var foo = _to5Helpers.interopRequire(_someModule);
|
var foo = _to5Helpers.interopRequire(_someModule);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user