Support 'exports' field in package.json of published modules. · Issue #1389 · TypeScriptToLua/TypeScriptToLua · GitHub
Skip to content

Support 'exports' field in package.json of published modules. #1389

Open

Description

@pilaoda

There are two problems about this field.

First:


The resolver should add conditions to support export conditions in a published module's package.json like:

{
    "exports": {
        "./client": {
            "require": "./dist/client/index.lua",
            "types": "./src/index.ts"
        }
    },
}

I guess we should add ["node", "require"], and maybe "tstl" ?
Related doc:

Second:


resolvePlugin use node-resolve rather than enhanced-resolve, which not support this "exports" field.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions