How to mark dependency as external? (Module not found!)
Answered
Burmese posted this in #help-forum
BurmeseOP
I have an app that uses
I don't use the feature that requires
The build fails because
How can I inform NextJS that this dependency is external, or somehow ignore this missing dependency?
auth0. It has an optional peer dependency of superagent-proxy.I don't use the feature that requires
superagent-proxy.The build fails because
superagent-proxy is not found.How can I inform NextJS that this dependency is external, or somehow ignore this missing dependency?
Answered by Burmese
Based on everything I know, I believe modifying the webpack config is my only option here:
webpack: config => {
// eslint-disable-next-line no-param-reassign
config.resolve.alias['superagent-proxy'] = false
return config
}1 Reply
BurmeseOP
Based on everything I know, I believe modifying the webpack config is my only option here:
webpack: config => {
// eslint-disable-next-line no-param-reassign
config.resolve.alias['superagent-proxy'] = false
return config
}Answer