Isomorphic fetch uses different dependencies when installed via npm vs bower.
Installing via npm will install whatwg-fetch.
Installing via bower will install fetch.
When building the bundle using a webpack configuration which will use bower.json over package.json, webpack will find the bower.json file for isomorphic-fetch and use the file referenced in the main field (fetch-bower) and use that as the file to bundle. fetch-bower is expecting a dependency named fetch to exist but it does not, the name of the dependency that was installed is whatwg-fetch.
We can avoid this situation by aliasing the bower dependency to whatwg-fetch, which is the same name as the dependency that gets installed via npm.
Isomorphic fetch uses different dependencies when installed via npm vs bower. Installing via npm will install whatwg-fetch. Installing via bower will install fetch.
When building the bundle using a webpack configuration which will use bower.json over package.json, webpack will find the bower.json file for isomorphic-fetch and use the file referenced in the
main
field (fetch-bower) and use that as the file to bundle. fetch-bower is expecting a dependency namedfetch
to exist but it does not, the name of the dependency that was installed iswhatwg-fetch
.We can avoid this situation by aliasing the bower dependency to
whatwg-fetch
, which is the same name as the dependency that gets installed via npm.