You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I use request-promise package which has peer dependency on request but only request-promise is bundled and request is missing. I used default nodeExternals() setup and switched to nodeExternals({ modulesFromFile: true }) but it is still the same (althoug I have both request and request-promise in dependencies of my package.json).
So I have to require the request in my code even if I don't use it directly. Have I forgotten to setup something or it is a bug?
The text was updated successfully, but these errors were encountered:
@JakubMatejka Just to be clear - do you want to bundle request-promise and request?
webpack-node-externals is meant for not bundling modules if you're targeting Node environment.
If you do want to bundle those modules, you would have to require them, otherwise Webpack won't mark them as dependencies to be added to the bundle.
Peer dependency means that request-promise is meant to be uses aside of request, and is expecting you to have it as a dependency (it is not requiring it directly).
(For example - a jQuery plugin may have a peer dependency of jQuery, so it won't bring jQuery on its own, but expects you to bring it yourself)
Hi, I use
request-promise
package which has peer dependency onrequest
but onlyrequest-promise
is bundled andrequest
is missing. I used defaultnodeExternals()
setup and switched tonodeExternals({ modulesFromFile: true })
but it is still the same (althoug I have bothrequest
andrequest-promise
in dependencies of my package.json).So I have to require the
request
in my code even if I don't use it directly. Have I forgotten to setup something or it is a bug?The text was updated successfully, but these errors were encountered: