Skip to content

Packages entry points support #9026

Open

Description

@pascalduez

Is there any plan to add support for packages entry points in Flow?
They are growing in usage and definitely handy.

The current solution is to stub them by creating folders and reexport indexes.

"exports": {
  ".": {
    "import": "./esm/index.js",
    "default": "./dist/index.js"
  },
  "./deprecated": {
    "import": "./esm/deprecated/index.js",
    "default": "./dist/deprecated/index.js"
  }
}
// ./deprecated/index.js.flow

// @flow 
export * from '../dist/deprecated';

I create them programatically on prepack and clean them on postpack.
Not the fanciest though.

See https://nodejs.org/dist/latest-v18.x/docs/api/packages.html#package-entry-points

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions