Open sapphi-red opened 6 months ago
Fallback arrays in the exports/imports field works differently among tools.
exports
imports
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, https://github.com/web-infra-dev/rspack/issues/5052#issuecomment-1867190334
Related issues: https://github.com/nodejs/node/issues/37928, https://github.com/nodejs/node/issues/44282, https://github.com/vitejs/vite/issues/4439, https://github.com/web-infra-dev/rspack/issues/5052, https://github.com/microsoft/TypeScript/issues/50762, https://github.com/webpack/enhanced-resolve/issues/400, https://github.com/lukeed/resolve.exports/issues/17, https://github.com/evanw/esbuild/issues/2974
Webpack (enhanced-resolve) has changed their behavior to align with Node.js: https://github.com/webpack/enhanced-resolve/pull/429
Fallback arrays in the
exports
/imports
field works differently among tools.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, https://github.com/web-infra-dev/rspack/issues/5052#issuecomment-1867190334
Related issues: https://github.com/nodejs/node/issues/37928, https://github.com/nodejs/node/issues/44282, https://github.com/vitejs/vite/issues/4439, https://github.com/web-infra-dev/rspack/issues/5052, https://github.com/microsoft/TypeScript/issues/50762, https://github.com/webpack/enhanced-resolve/issues/400, https://github.com/lukeed/resolve.exports/issues/17, https://github.com/evanw/esbuild/issues/2974