Where does this `webpack://` come from for `webpack-dev-middleware`?
I'm using https://github.com/gaearon/react-transform-boilerplate.
When I view the source code in Chrome, I saw a source is called webpack://
(see the picture below)
However, when I access the URL such as webpack:///src/App.js?14b1
. I find the file is not accessible.
Does anyone have ideas about where does this webpack://
sources come from?
Answer
This the result of webpack sourcemaps having been resolved in the browser.
Source maps provide a mapping between bundled and unbundled code. By convention, webpack sourcemaps places a webpack://
to namespace a resolved piece of unbundled code.
Once the webpack sourcemaps are produced (usually a file named <name>.js.map
), you can open the .js.map
file and see that values in the the sources
property are prefixed with webpack://
. This is the source root for sourcemaps configured by webpack.
Related Questions
- → How to update data attribute on Ajax complete
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → Octobercms Component Unique id (Twig & Javascript)
- → Passing a JS var from AJAX response to Twig
- → Laravel {!! Form::open() !!} doesn't work within AngularJS
- → DropzoneJS & Laravel - Output form validation errors
- → Import statement and Babel
- → Uncaught TypeError: Cannot read property '__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' of undefined
- → React-router: Passing props to children
- → ListView.DataSource looping data for React Native
- → Can't test submit handler in React component
- → React + Flux - How to avoid global variable
- → Webpack, React & Babel, not rendering DOM