I am trying to use node-postgres to hook my app up to Postgres. The code I use is:
import React from \'react\'; import pg from \'pg\'; import fs from \'fs\';
In that case, add this to your webpack config:
{ node: { __dirname: true } }
This will tell webpack to replace __dirname instances with the path of the module. This path relative to context
__dirname
context