Skip to content

Ignore unresolvable entry paths #60

@muratgozel

Description

@muratgozel

Problem

for the following exports:

  "exports": {
    "./modules/dayjs.js": {
      "import": {
        "types": "./dist/modules/dayjs.d.ts",
        "default": "./dist/modules/dayjs.js"
      }
    },
    "./svelte/store/device.js": {
      "import": {
        "types": "./dist/svelte/store/device.d.ts",
        "default": "./dist/svelte/store/device.js"
      }
    },
    "./Banner.svelte": {
      "types": "./dist/svelte/components/elements/LoadingBar.svelte.d.ts",
      "svelte": "./dist/svelte/components/elements/LoadingBar.svelte"
    },
  },

the lib is trying to read .svelte files too which is not recognized in node env:

Error: Could not find matching source file for export path "./dist/svelte/components/elements/Banner.svelte"

Expected behavior

i package svelte files with a different bundler (@sveltejs/package) therefore i would expect an option to ignore some files in exports.

Minimal reproduction URL

https://stackblitz.com/edit/vitejs-vite-kw52rd?file=package.json

Version

v2.0.2

Node.js version

v20.9

Package manager

npm

Operating system

macOS

Contributions

  • I plan to open a pull request for this issue
  • I plan to make a financial contribution to this project

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions