The original question jumps a bit, so I will try to answer the question, as I see it:
Will the source maps for the "production" builds using webpack still have the webpack:// -style paths for the source paths?
First of all, there really is no such thing as a production assembly when it comes to the inside of webpack. In fact, there are 0 references to NODE_ENV in the actual webpack source code.
This is important to note because it opens the way to understanding that the web package is not aware of the environment in which it is built. Thus, the output of the webpack package does not change unless you change it, i.e. By changing the use of webpack configuration.
Moving to the source maps, all devtools (types of source maps) use roughly the same (custom) devtool file template . All file names used by devtools (source maps) follow this pattern, which starts with webpack:// by default. Thus, all the paths generated for the source maps start with webpack:// , taking into account the default value.
So, to answer the above question: yes , the source maps of the βproductionβ builds will have paths using the webpack:// protocol, if output.devtoolModuleFilenameTemplate .
source share