From 565412d174d1e5aaa597d903b5494619b0735f0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Connor=20B=C3=A4r?= Date: Fri, 7 Feb 2025 07:26:09 +0100 Subject: [PATCH] Fix type resolution for subpath exports when using `moduleResolution: node` (#2486) --- modules/main/package.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/main/package.json b/modules/main/package.json index bb5c901f0..8d3b7faa8 100644 --- a/modules/main/package.json +++ b/modules/main/package.json @@ -32,6 +32,19 @@ "import": "./dist/mapbox-legacy/index.js" } }, + "typesVersions": { + "*": { + "mapbox": [ + "./dist/mapbox.d.ts" + ], + "maplibre": [ + "./dist/maplibre.d.ts" + ], + "mapbox-legacy": [ + "./dist/mapbox-legacy/index.d.ts" + ] + } + }, "files": [ "src", "dist",