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

False positives makes esbuild to fail? #17

Closed
pateketrueke opened this issue Jan 10, 2023 · 2 comments
Closed

False positives makes esbuild to fail? #17

pateketrueke opened this issue Jan 10, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@pateketrueke
Copy link

I found that you MUST prefix the paths with ./ or they'll fail with esbuild, not sure if this happens with other bundlers or environments, e.g.

"exports": {
  ".": {
    "import": "dist/somedom.mjs",
    "require": "dist/somedom.js",
    "browser": "dist/somedom.umd.js"
  },
  "./ssr": {
    "import": "dist/index.ssr.mjs",
    "require": "dist/index.ssr.js"
  }
}

This configuration yields The package target "dist/somedom.mjs" is invalid if consumed on other modules.

Once I prefixed the paths to ./dist then it worked without issues.

I think this is an issue, because I ran publint and it said it was correct, which was not true.

So much thanks for this amazing tool, see you!

@bluwy
Copy link
Owner

bluwy commented Jan 11, 2023

Good idea! I think that's required by nodejs too so we should probably enforce this.

@bluwy bluwy added the enhancement New feature or request label Jan 11, 2023
@bluwy bluwy closed this as completed in fcaa491 Jan 11, 2023
@bluwy
Copy link
Owner

bluwy commented Jan 11, 2023

Supported in v0.1.6. The site should be updated too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants