Skip to content

Add CommonJS support #20

@barshopen

Description

@barshopen

The package uses package.json exports for subpath imports like @openai/apps-sdk-ui/components/Button. And this doesn't work with moduleResolution: "node".

In our project we added moduleResolution: "node" which we cannot override.
When TypeScript tries to resolve:

  import { ButtonLink } from '@openai/apps-sdk-ui/components/Button';

It fails with:

TS2307: Cannot find module '@openai/apps-sdk-ui/components/Button' or its corresponding type declarations.
There are types at '.../@openai/apps-sdk-ui/dist/types/components/Button/index.d.ts',
but this result could not be resolved under your current 'moduleResolution' setting.

Is there a chance we could add CJS exports?
I am willing to implement this request if you guys are open for that

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