I use Webpack to bind dependencies, one of which is the email service postmark. This service depends on what is called child_process, which apparently comes with node.
The problem is that when I try to start webpack to bundle my application, it complains:
Module not found: Error: cannot resolve module "child_process" to ...
Most of the answers on the Internet say that in response to this error I should add the line:
node: {
child_process: 'empty'
}
into my webpack configuration. But this does not make any sense, because then webpack just does not try to look for child_process, and therefore, when I launch my application, I get the following error:
Uncaught TypeError: exec is not a function
which is a bug postmark(a service that relies on child_process) complains that the function execin the module child_processdoes not exist.
So I am wondering how can I include a module child_processin my assembly without complaining about the web package?
source
share