Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto-resolve dependencies that only import from a directory #907

Open
1 of 5 tasks
thescientist13 opened this issue Mar 3, 2022 · 2 comments · May be fixed by #1326
Open
1 of 5 tasks

auto-resolve dependencies that only import from a directory #907

thescientist13 opened this issue Mar 3, 2022 · 2 comments · May be fixed by #1326
Labels
alpha.0 CLI enhancement Improve something existing (e.g. no docs, new APIs, etc) v0.30.0
Milestone

Comments

@thescientist13
Copy link
Member

Type of Change

  • New Feature Request
  • Documentation / Website
  • Improvement / Suggestion
  • Bug
  • Other (please clarify below)

Summary

A part of #820 / #832, wanted to capture a follow up issue to capture an enhancement for dependencies that assume directory level index.js files will auto resolve and are not captured in an export map

import { foo } from 'some-package/lib';  // where it _actually_ exists at  'some-package/lib/index.js'

Details

Discovered this as part of testing a Stencil integration and found this particular scenario happening. @stencil/core in this case has an entry point ultimately points to a file with no file extension.

import { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';

The directory does have an index.js so there is that to use / check for, as well as a package.json, so seems like we should be able to do something with either of those.

Should also file this with the Stencil team as well.

@thescientist13
Copy link
Member Author

since this is non-standard behavior, I'm not inclined to support this, but let's see where things stand after integrating with some more libraries as part of this phase.

@thescientist13
Copy link
Member Author

Assuming this is done through an export map, this will now work once #1326 is merged, otherwise non-standard behavior will not be supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha.0 CLI enhancement Improve something existing (e.g. no docs, new APIs, etc) v0.30.0
Projects
Status: 👀 In review
1 participant