Skip to content

Commit 033248a

Browse files
committed
exports: also accept .js-suffixed deep imports
The exports map's './lib/*' pattern only covers bare deep imports like require('rclnodejs/lib/distro'). Add a sibling './lib/*.js' pattern so require('rclnodejs/lib/distro.js') resolves the same file, instead of erroneously mapping to './lib/distro.js.js' and throwing ERR_PACKAGE_PATH_NOT_EXPORTED. Verified all forms now resolve: bare and .js-suffixed, top-level and nested (lib/action/client[.js]).
1 parent c0a3d1c commit 033248a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
},
1616
"./rosocket": "./rosocket/index.js",
1717
"./lib/*": "./lib/*.js",
18+
"./lib/*.js": "./lib/*.js",
1819
"./package.json": "./package.json"
1920
},
2021
"keywords": [

0 commit comments

Comments
 (0)