Skip to content

add import and directory support to export map subpath exports#672

Merged
thescientist13 merged 1 commit into
masterfrom
bug/issue-671-export-map-directory-and-import-subpath-export-support
Jul 28, 2021
Merged

add import and directory support to export map subpath exports#672
thescientist13 merged 1 commit into
masterfrom
bug/issue-671-export-map-directory-and-import-subpath-export-support

Conversation

@thescientist13
Copy link
Copy Markdown
Member

@thescientist13 thescientist13 commented Jul 25, 2021

Related Issue

resolves #671

Summary of Changes

  1. If subpath export is a directory, add each file to the importMap
  2. Added support for subpath exports that are of type import

Blocking #611 and AnalogStudiosRI/www.analogstudios.net#8

Discussion

I'm thinking now, based on the nature of this fix, if we actually stillvneed walkModule to manually crawl all the imports and exports of every dependency to add to the importMap?. I would be curious to try now with this bug fix to see if our importMap still works without it? Maybe should happen as part of a minor release though, so this PR can just go out as a patch.

Additionally, not sure if a sub path export is a directory, does that mean we should recursively export everything? Could be part of an issue that also addresses the above question re: walkModule, which coincidentally, I've playing around with in #668

Update: made a quick test ( #672 (comment) ) so seems like it is still needed.

@thescientist13 thescientist13 added bug Something isn't working P0 Critical issue that should get addressed ASAP CLI discussion tied to an ongoing discussion or meeting notes labels Jul 25, 2021
@thescientist13
Copy link
Copy Markdown
Member Author

As a simple test, tried commenting out the walkModule function calls and at least for this version of Lit, got this error, so seems like it is still needed.
Screen Shot 2021-07-28 at 10 32 04 AM

Can re-evaluate further in #674 if desired, since no big changes you should really happen in a patch fix, IMO.

@thescientist13 thescientist13 merged commit 606268f into master Jul 28, 2021
@thescientist13 thescientist13 deleted the bug/issue-671-export-map-directory-and-import-subpath-export-support branch July 28, 2021 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working CLI discussion tied to an ongoing discussion or meeting notes P0 Critical issue that should get addressed ASAP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

import map not correctly handling export maps that have subpath exports that are directories or are import

1 participant