Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a valid ESM entry point in package.json #280

Open
kingyue737 opened this issue Aug 15, 2024 · 0 comments · May be fixed by #281
Open

Need a valid ESM entry point in package.json #280

kingyue737 opened this issue Aug 15, 2024 · 0 comments · May be fixed by #281

Comments

@kingyue737
Copy link

kingyue737 commented Aug 15, 2024

Although we already have module: dist/index.mjs, Node.js doesn't recognize the "module" field. Instead, we should use "exports" to increase compatibility with it. So we can use it on the server side. For example:

{
  "name": "expr-eval",
  "exports": {
    ".": {
      "types": "./parser.d.ts",
      "import": "./dist/index.mjs",
      "require": "./dist/bundle.js"
    }
  }
}

check here: https://publint.dev/[email protected]
check also: https://arethetypeswrong.github.io/?p=expr-eval%402.0.2

@kingyue737 kingyue737 linked a pull request Aug 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant