I see a flaw in the code.
On top, it uses "let cwd = process.cwd()".
This will not work if I run webpack in different directory. Many people nowadays have separate Server and Client folders. And the server runs webpack on client folder when building.
At that point, cwd=process.cwd() will be a server path, while cwd is supposed to be Client path.
Please at least give an option for a user to customize cwd.
I see a flaw in the code. On top, it uses "let cwd = process.cwd()". This will not work if I run webpack in different directory. Many people nowadays have separate Server and Client folders. And the server runs webpack on client folder when building. At that point, cwd=process.cwd() will be a server path, while cwd is supposed to be Client path. Please at least give an option for a user to customize cwd.