rolldown-plugin-dts 0.9.5 → 0.9.6
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.js +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -587,7 +587,8 @@ function rewriteImportExport(node, set) {
|
|
|
587
587
|
return false;
|
|
588
588
|
}
|
|
589
589
|
function importNamespace(node, imported, source, getIdentifierIndex, prepend) {
|
|
590
|
-
|
|
590
|
+
const sourceText = source.value.replaceAll(/\W/g, "_");
|
|
591
|
+
let local = t.identifier(`${sourceText}${getIdentifierIndex()}`);
|
|
591
592
|
prepend(t.importDeclaration([t.importNamespaceSpecifier(local)], source));
|
|
592
593
|
if (imported) {
|
|
593
594
|
const importedLeft = getIdFromTSEntityName(imported);
|
|
@@ -891,7 +892,7 @@ function createDtsResolvePlugin({ tsconfig, resolve, resolvePaths }) {
|
|
|
891
892
|
...resolution,
|
|
892
893
|
meta
|
|
893
894
|
};
|
|
894
|
-
if (resolvePaths && (RE_NODE_MODULES.test(resolution?.id || id) || !isRelative(resolution?.id || id))) return resolveDependency(
|
|
895
|
+
if (resolvePaths && (RE_NODE_MODULES.test(resolution?.id || id) || !isRelative(resolution?.id || id))) return resolveDependency(id, importer);
|
|
895
896
|
if (!resolution || resolution.external) return resolution;
|
|
896
897
|
if (RE_JS.test(resolution.id)) {
|
|
897
898
|
resolution = await this.resolve(filename_js_to_dts(resolution.id), importer, options);
|