how to make webpack sourcemap to original files
I changed this:
output: { // ...snip... devtoolModuleFilenameTemplate: function(info){ return "file:///"+info.absoluteResourcePath; }},
to this:
output: { // ...snip... devtoolModuleFilenameTemplate: function(info){ return "file:///"+encodeURI(info.absoluteResourcePath); }},
and now it encodes the spaces properly, and the sourcemap file works as expected.
Thanks to Rob Lourens, this problem is caused by spaces and other special characters in the file path that may break sourcemaps.