Repository navigation
Commit 64191de
Drop the dead 'url' core module fallback in lib/url.js
`lib/url.js` fell back to `require("url").URL` when `URL` was not a
global, which was only the case on Node 8. This package requires Node
>= 12 and `URL` has been global since Node 10, so the fallback was
unreachable.
It was not harmless, though: bundlers that no longer polyfill Node core
modules fail outright on it. Under webpack 5 this breaks `npm run build`
in bench/ with:
Module not found: Error: Can't resolve 'url' in '.../lib'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js
core modules by default.
The comment above it also claimed the file was overridden via
`package.json#browser` to use `lib/url-browser.js`. That stopped being
true in b95ecf0, which removed `lib/url-browser.js` without removing the
browser mapping's last reader or this comment.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>1 parent 31615d3 commit 64191de
1 file changed
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments