Skip to content

package.json "exports" field fallback array support #4439

@tarnishablec

Description

@tarnishablec

Clear and concise description of the problem

Currently vite does not support fallback array in "exports" field in package.json, vite does support array type but when first entrypoint is not accessable, an error will show. webpack 5 has already has a implementation in Alternatives.

Suggested solution

add fallback array support

Alternative

No response

Additional context

"exports": {
    "default": {
      "import": [
        "./dist/index.esm.js",
        "./src/index.tsx"
      ],
      "require": "./dist/index.umd.js"
    }
  },

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestp2-to-be-discussedEnhancement under consideration (priority)

    Type

    No type

    Projects

    Status

    P2 - 3

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions