Skip to content

Using a libkit library in an Ember app #2

@chriskrycho

Description

@chriskrycho

(This may well be moving- and family-health-problems-induced 🤦‍♂️, but it's not obvious so I figured I'd write it up as a question.)

I've converted a small library to using libkit, and while the build tooling is quite nice, what I've found is that when I try to consume it from within our Ember application, I'm not getting the benefits of the modules – TypeScript simply doesn't resolve anything but index.d.ts via the import syntax.

Example:

// works; these are the Maybe and Result *modules*; they're re-exported
// from the index file
import { Maybe, Result } from 'true-myth';

// does not work; TS seems not to identify this module's existence
import { just, nothing } from 'true-myth/maybe';

It seems related to this issue, and specifically the solution posited by this comment seems like it might work; but I'm not 100% positive, and if so that seems like a limitation of the current implementation?

Again, quite possibly I'm missing something! Or perhaps it's necessary to do something like the post-install steps or custom "paths" value suggested in that thread?

Edit: I can confirm that manually adding the paths works, but this seems very much less than optimal in general.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions