After the recent change intended to support CommonJS, the ability to require("urlpattern-polyfill") now works, but due to the missing main field in package.json pointing to the CJS version, the eslint rule node/no-missing-require now complains about the line to require("urlpattern-polyfill");.
After the recent change intended to support CommonJS, the ability to
require("urlpattern-polyfill")
now works, but due to the missingmain
field in package.json pointing to the CJS version, the eslint rulenode/no-missing-require
now complains about the line torequire("urlpattern-polyfill");
.To fix this, add these lines back to package.json
I've tested this fix when using CommonJS. I haven't yet tested the fix when using ESM.