When using “dynamic requires”, it seems that webpack is unable to deal with npm scoped packages, i.e.
require("my-module/lib/" + dynamicOne + "/" + dynamicTwo + ".ext");
works while
require("@my/module/lib/" + dynamicOne + "/" + dynamicTwo + ".ext");
doesn’t. Moreover, I tried to use the following alias as a workaround:
"my-module": "@my/module"
to no avail.
Searching turned up nothing except #1256 which seems to be a similar issue, albeit a different one.
I think I’m just crazy, sorry for the noise.