-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
Per Webpack's issue template:
<!-- Bug reports and Feature requests must use other templates, or will be closed -->
<!-- Please ask questions on StackOverflow or the webpack Gitter (https://gitter.im/webpack/webpack). -->
<!-- Issues which contain questions or support requests will be closed. -->
I originally tried asking this question on StackOverflow, but with no luck. Since the question will likely be deleted, I will copy the contents below:
I downloaded and searched the documentation repository using my text editor for the string
webpack://
, and found it located in only two documents:
- src/content/configuration/index.md
- which goes to: https://webpack.js.org/configuration/
- src/content/configuration/output.md
- which goes to: https://webpack.js.org/configuration/output/
As far as I can tell, this is not an actual protocol, much less one a browser can understand.
Questions:
- What is the
webpack:
protocol intended to be used for?- Where can I find documentation on it?
- (assuming it is used internally by webpack or webpack dev server) Why do I see it output in Source Maps or in some project boiler plates, when the browser has no way of understanding what it should do with the protocol?
Update 2018-05-25
I checked Webpack's source code in addition to their documentation repo, and this is what I found:
https://github.com/webpack/webpack/tree/v4.8.3/examples/source-map/
lib/EvalDevToolModuleTemplatePlugin.js
lib/EvalSourceMapDevToolModuleTemplatePlugin.js
lib/SourceMapDevToolPlugin.js
(Paths instead of links since I lack the reputation to post more than 8)
StackOverflow Comments
I mean that the structure of the source URL in a sourcemap is meaningless to tooling. ie, the protocol doesn't matter. – SLaks May 25 at 15:17
... The protocol shouldn't matter, but for some reason it does, especially when the final sourcemap includes this as a protocol. The browser has no way of understanding a
webpack://
URL. It shows up in the links above and in Angular CLI ( github.com/angular/angular-cli/blob/1.7.x/packages/%40angular/… ) when you eject a configuration (I'm currently on 1.7.4, they recently made the jump from 1.x to 6.x, which temporarily removes "eject"). I'd like to know why the webpack and angular teams use it. – nick May 25 at 16:27
Since Angular CLI also uses/used the webpack://
protocol, is there anyone here who might be able to explain it to me?
Thanks and regards.