Preserve import binding locations during module rewriting (#7378)
* Only wrap import references that need it. * Preserve the import binding location for sourcemaps. * Add tests.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import aDefault from "one";
|
||||
import { aNamed } from "two";
|
||||
import { orig as anAliased } from "three";
|
||||
import * as aNamespace from "four";
|
||||
|
||||
console.log(aDefault);
|
||||
console.log(aNamed);
|
||||
console.log(anAliased);
|
||||
console.log(aNamespace);
|
||||
|
||||
console.log(aDefault());
|
||||
console.log(aNamed());
|
||||
console.log(anAliased());
|
||||
console.log(aNamespace());
|
||||
Reference in New Issue
Block a user