Closed dmail closed 3 years ago
Subpath folder mappings is deprecated and should be replaced with subpath patterns.
https://nodejs.org/dist/latest-v15.x/docs/api/packages.html#packages_subpath_patterns https://nodejs.org/dist/latest-v15.x/docs/api/packages.html#packages_subpath_folder_mappings
There is no pattern equivalent in the importmap spec (for now?) as explained in https://github.com/WICG/import-maps/issues/232.
This repository could detect the presence of * in exports field and try to do conversion when possible
*
exports
{ "exports": { "./features/*": "./features/*" } }
Can be converted into importmap (just removing the *)
{ "imports": { "./features/": "./features/" } }
However
{ "exports": { "./features/*": "./features/*.js" } }
Cannot be converted to import map, it would be ignored and some console.warn would explain why.
console.warn
Done, in the end the console.warn is no longer relevant because we support the * notation to add extension since the source files gets parsed to add extension.
Subpath folder mappings is deprecated and should be replaced with subpath patterns.
https://nodejs.org/dist/latest-v15.x/docs/api/packages.html#packages_subpath_patterns https://nodejs.org/dist/latest-v15.x/docs/api/packages.html#packages_subpath_folder_mappings
There is no pattern equivalent in the importmap spec (for now?) as explained in https://github.com/WICG/import-maps/issues/232.
This repository could detect the presence of
*
inexports
field and try to do conversion when possibleCan be converted into importmap (just removing the
*
)However
Cannot be converted to import map, it would be ignored and some
console.warn
would explain why.