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

Warn on the usage of fallback arrays in the exports/imports field #92

Open
sapphi-red opened this issue Mar 14, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@sapphi-red
Copy link
Sponsor Contributor

Fallback arrays in the exports/imports field works differently among tools.

  • Node.js, Vite, esbuild: only validates the path
  • Webpack, TypeScript: check the file existence

To make a package compatible with all tools, I think it should be recommended to avoid using this feature.
https://x.com/atcb/status/1736987593534034184, web-infra-dev/rspack#5052 (comment)

Related issues: nodejs/node#37928, nodejs/node#44282, vitejs/vite#4439, web-infra-dev/rspack#5052, microsoft/TypeScript#50762, webpack/enhanced-resolve#400, lukeed/resolve.exports#17, evanw/esbuild#2974

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