Version
System:
OS: Windows 11 10.0.26100
CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-12600KF
Memory: 18.99 GB / 31.83 GB
Browsers:
Edge: Chromium (130.0.2849.46)
Internet Explorer: 11.0.26100.1882
Details
When using an npm package generated by create-rslib in a Webpack 4 project, the build fails with module resolution errors. This occurs because:
- The generated package.json only contains the
exports field
- Webpack 4 has limited support for the
exports field resolution
- Missing fallback
main/module fields that Webpack 4 expects
Reproduce link
N/A
Reproduce Steps
- Create a package using create-rslib
- Use it in a Webpack 4 project
- Run build command
- Observe module resolution failure