1 thought on “I have a question __dirname setting of node config

  1. __dirname: false disables webpack processing of __dirname. If you run the bundle in node.js it falls back to the __dirname of node.js (which makes sense for target: node).

    @sokra given what you said above re what makes sense, why is webpack unexpectedly breaking node’s behaviour? Shouldn’t the node options all be false automatically if target is node? The mangling of __dirname is counter intuitive and without warning. And in most cases, the output built for node will operate incorrectly rather than failing.

Comments are closed.