modify entrypoints.ts to handle wildcards in package.json export node…#3890
modify entrypoints.ts to handle wildcards in package.json export node…#3890sagrimson wants to merge 1 commit intoFredKSchott:mainfrom
Conversation
|
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/pikapkg/snowpack/9qj5VxXxSAkv9wBjjiTn8Ej1D6ik |
|
Great work..Has this been released? I downloaded [snowpack] 3.8.8, and found that files in the 'subdirectories' were not being 'exported'. My use-case is the @Shoelace components. The issue is: |
… recursively
Changes
This PR addresses the issue described here: #3867
The current function only returns paths to modules that are in the top level of the directory, but it should return all files in the subdirectories according to this: https://nodejs.org/api/packages.html#subpath-patterns. To fix this, I modified the function
forEachWildcardEntry()to yield files in subdirectories.Testing
I tested this in my local environment and can now import modules that are in subdirectories of wildcard entries of the export field of the package.json
Docs