Giter Site home page Giter Site logo

Comments (2)

transitive-bullshit avatar transitive-bullshit commented on August 18, 2024

@rileytomasek what do you think of switching all example usage to import from @dexaai/dexter? We can keep the ESM exports to remain backwards compatible.

Reasoning:

  • The current exports version is broken in many TS projects (including all 3 of my own projects I've tested it on)
    • Fixing this would likely be a headache and possibly involve re-adding something like tsup OR requiring moduleResolution: "bundler", which I feel like is a non-starter for a general NPM package
  • I know a lot of people have auto-imports, but DX-wise not everyone does, and I've found having multiple imports from dexter to be a pain so far.
  • As we add additional functionality to dexter (more providers, chunking, etc), this DX issue will only get worse
  • We can still keep the ESM exports if devs care about optimal imports for edge/serverless use cases, but right now all of our usage is Node.js, so we're really not gaining anything from not having a simple entrypoint

from dexter.

rileytomasek avatar rileytomasek commented on August 18, 2024

"moduleResolution": "node" is not the correct configuration for an ESM project — the correct values are bundler, node16, or nodenext. Sindre explains more here. Our time is better spend improving the library that providing compatibility with legacy CJS.

Adding root exports will likely just make this even harder to debug because then the import may work and it will fail deeper into the code.

from dexter.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.