It is very tough to find out what exactly is needed to generate sourcemaps.
While on a few spots, it is described that only devtool: 'source-map' is needed, there is no notion of the source-map-loader. The page for the source-map-loader doesn't disclose anything required either: https://webpack.js.org/loaders/source-map-loader/
The guide to source-maps only speaks about devtool, but not the loader.
https://webpack.js.org/guides/development/#source-maps
And then there is source-map-dev-tool-plugin which talks about sourcemaps for assets (what are assets in this case?)
Are the three related somehow? are all required to create sourcemaps?
Please update the docs.
@MartinMuzatko only devtool: 'source-map' is necessary. I'm not 100% sure what the loader and plugin do, definitely more clarification is needed on the plugin and loader pages.
I have a PR in review to better explain the source-map-loader plugin, but that's in on that project's Github Repo. I'd want to make sure that the content on the 2.0 Docs site is consistent.
cc: @bebraw : I'd be happy to update docs on both source-map-loader as well as SourceMapDevToolPlugin. Is there automation in place so that a content update would propagate to all mentions? For example, source-map-loader has documentation on:
Thanks!
@ecarlisle Thanks. Just added a comment for you.
The documentation site picks up the loader/plugin readme files automatically. There's no automation apart from that, though.
If you are worried about duplicating content, it's better to keep the readme fairly simple and link to the official docs for more info.
@bebraw : Great! Sounds like the project repo is the place to make the readme change and the documentation site will assimilate that. If that's the case I've do worries about duplicated content.
Thank you so much for putting so much heart and love into the documentation :)
Multiple source-mapping updates have been merged now like #1133 #1166 and the source-map-loader readme which is dynamically pulled in. Feel free to re-open with specifics if I missed something.