In the case where a polyfill has devDependencies, we currently resolve those devDependencies from the root, rather than from the correct polyfills/*. In the case where there are multiple versions of those devDependencies, it could mean that we are resolving the wrong versions.
To reproduce:
Add "whatwg-url": "14.0.0" to a package.json file in the URL polyfill
Add the following to config.toml in the URL polyfill:
See Error: Cannot find module 'whatwg-url/index.js' because whatwg-url@5 (which is in the root node_modules) does not have index.js (even though whatwg-url@14 does)
In the case where a polyfill has
devDependencies
, we currently resolve thosedevDependencies
from the root, rather than from the correctpolyfills/*
. In the case where there are multiple versions of thosedevDependencies
, it could mean that we are resolving the wrong versions.To reproduce:
"whatwg-url": "14.0.0"
to apackage.json
file in theURL
polyfillconfig.toml
in theURL
polyfill:Error: Cannot find module 'whatwg-url/index.js'
becausewhatwg-url@5
(which is in the rootnode_modules
) does not haveindex.js
(even thoughwhatwg-url@14
does)