Skip to content

Latest commit

 

History

History
17 lines (9 loc) · 1.13 KB

README.md

File metadata and controls

17 lines (9 loc) · 1.13 KB

Source Maps

A source map is a file that maps the transformed source code to the original one. By using a source map the developer can debug an app with more precision.

Configuration

Webpack can be configured to serve multiple types of source maps using devtool option.

When running webpack in development mode eval source map is generated by default inside the bundled file (inline source map). Running webpack in production mode do not emit source maps.

To enable source maps for stylesheets you must set css-loader sourceMap: true, style-loader will automatically inject source maps when previous loader emit them.

To extract source maps into a separate file set webpack devtool: "source-map" option, this produce high quality source maps but increase the build time.

Further reading

SurviveJS - Source Maps