Skip to content

Wrong file names on adjusted exports from package.json #247

@neo-reply-lukas

Description

@neo-reply-lukas

Hello!

The package.json has wrong filenames for the built files in its exports. Leads to errors when importing fsxa-api in latest versions.

fsxa-api.esm.js --> fsxa-api.es5.js
fsxa-proxy-api.csm.js --> fsxa-proxy-api.es5.js

You can easily confirm the correct names by running npm run build in the repo and look at the files generated.
PR with the fix: #249

The mismatch
package.json:

    ".": {
      "types": "./dist/types/index.d.ts",
      "import": "./dist/fsxa-api.esm.js",
      "require": "./dist/fsxa-api.cjs.js",
      "default": "./dist/fsxa-api.cjs.js"
    }

should be

    ".": {
      "types": "./dist/types/index.d.ts",
      "import": "./dist/fsxa-api.es5.js",
      "require": "./dist/fsxa-api.cjs.js",
      "default": "./dist/fsxa-api.cjs.js"
    }

Also for proxy/package.json (but a different typo)

    ".": {
      "types": "./dist/types/index.d.ts",
      "import": "./dist/fsxa-proxy-api.csm.js",
      "require": "./dist/fsxa-proxy-api.cjs.js",
      "default": "./dist/fsxa-proxy-api.cjs.js"
    }
  },

Should be

"exports": {
    ".": {
      "types": "./dist/types/index.d.ts",
      "import": "./dist/fsxa-proxy-api.es5.js",
      "require": "./dist/fsxa-proxy-api.cjs.js",
      "default": "./dist/fsxa-proxy-api.cjs.js"
    }
  },

What happened?
When the issue #242 was fixed, the correct suggestion has been commited here c3cb570
but a follow up commit when applying the fix introduced the errors 193bc2e

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