webpack: Bugged as hell

Bug report

Whenever application assets are outside the source folder webpack bugs completeley throwing all kinds of errors and warnings:

  • Tries to load .txt LICENSE non sense
  • Tries to load .ts files even more non sense
  • Tries to load .tsx files also non sense
  • Tries to load .html files also non sense

And also by changing:

require("../assets/" + name + ".css");

with

require("../" + name);

Webpack will now try to include Linux root file system “/”!!! Amazing non sense. When it does that be sure to quickly run a SIGKILL to avoid crashing HDD!!

What is the current behavior? Webpack will attempt to load non-sense files including linux root file system.

If the current behavior is a bug, please provide the steps to reproduce. And also by changing:

require("../assets/" + name + ".css");

with

require("../" + name);

What is the expected behavior? I think Webpack isn’t supposed to be acting like a virus indexing the entire HDD…

Other relevant information: webpack version: 4.44.1 Node.js version: 10.19.0 Operating System: Pop!_OS 20.04 Additional tools: Electron JS

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (10 by maintainers)

Most upvoted comments

At least thanks for the info, now that I know what webpack really does, I can find ways to optimize differently