From 5501fe3873b74ae6d1cce4583de53b83ee146277 Mon Sep 17 00:00:00 2001 From: Eric Carlisle Date: Mon, 10 Apr 2017 21:12:46 -0400 Subject: [PATCH] docs(README): add details on usage and purpose (#37) --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8aa616a..b43eeaf 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,11 @@ module.exports = { }; ``` -This extracts SourceMaps from all js files (including node_modules). This is not very performant, so you may want to only apply the loader to relevant files. +`source-map-loader` extracts existing source maps from all JavaScript entries. This includes both inline source maps as well as those linked via URL. All source map data is passed to webpack for processing as per a chosen [source map style](https://webpack.js.org/configuration/devtool/) specified by the `devtool` option in [webpack.config.js](https://webpack.js.org/configuration/). + + + +This loader is especially useful when using 3rd-party libraries having their own source maps. If not extracted and processed into the souce map of the webpack bundle, browsers may misinterpret source map data. `source-map-loader` allows webpack to maintain source map data continuity across libraries so ease of debugging is preserved. + + + +`source-map-loader` will extract from any JavaScript file, including those in the `node_modules` directory. Be mindful in setting [include](https://webpack.js.org/configuration/module/#rule-include) and [exclude](https://webpack.js.org/configuration/module/#rule-exclude) rule conditions to maximize bundling performance.

Maintainers