vite-plugin-dts 3.8.0 → 3.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -477,7 +477,11 @@ function transformCode(options) {
477
477
  }
478
478
  if (node.importClause.namedBindings && ts__default.isNamedImports(node.importClause.namedBindings)) {
479
479
  node.importClause.namedBindings.elements.forEach((element) => {
480
- importSet.add(element.name.escapedText);
480
+ if (element.propertyName) {
481
+ importSet.add(`${element.propertyName.escapedText} as ${element.name.escapedText}`);
482
+ } else {
483
+ importSet.add(element.name.escapedText);
484
+ }
481
485
  });
482
486
  }
483
487
  s.remove(node.pos, node.end);
package/dist/index.mjs CHANGED
@@ -474,7 +474,11 @@ function transformCode(options) {
474
474
  }
475
475
  if (node.importClause.namedBindings && ts.isNamedImports(node.importClause.namedBindings)) {
476
476
  node.importClause.namedBindings.elements.forEach((element) => {
477
- importSet.add(element.name.escapedText);
477
+ if (element.propertyName) {
478
+ importSet.add(`${element.propertyName.escapedText} as ${element.name.escapedText}`);
479
+ } else {
480
+ importSet.add(element.name.escapedText);
481
+ }
478
482
  });
479
483
  }
480
484
  s.remove(node.pos, node.end);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-dts",
3
- "version": "3.8.0",
3
+ "version": "3.8.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "qmhc",