-
Notifications
You must be signed in to change notification settings - Fork 565
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
bundling issues with webpack #1992
Comments
Could you tell us more about the compatibility issues you are facing? Our test suite (minus fetch, which is 16+) pass on node v12: https://github.com/nodejs/undici/actions/runs/4331585584. |
I guess the issue is when the library is bundled (e.g. by webpack), it causes code that's conditionally required only on certain Node versions to be included in the resulting code bundle, and there are instances of nullish coalesce assignmen t ( Without bundling those are only required on Node 16+ but when bundled, it causes parsing errors even though those features aren't used. I've worked around it so far by configuring Babel to parse&transform this library. Perhaps at least a warning about using this library with bundlers in the docs would be helpful. |
We could also not use |
we've had regressions so I'd rather not accept a PR unless tests are included |
Currently
package.json
specifies>=12.18
inengines.node
, but the code uses??=
andutil/types
which are Node.js 15+ features.The implementation should look like...
Updating
package.json
to reflect the correct minimum Node.js version.I have also considered...
Alternatively, the code could stop using those features to retain compatibility with 12.18+
The text was updated successfully, but these errors were encountered: