Skip to content

What is needed in Webpack 2 to create sourcemaps? #971

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MartinMuzatko opened this issue Mar 2, 2017 · 6 comments
Closed

What is needed in Webpack 2 to create sourcemaps? #971

MartinMuzatko opened this issue Mar 2, 2017 · 6 comments

Comments

@MartinMuzatko
Copy link

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.

@skipjack
Copy link
Collaborator

@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.

@ecarlisle
Copy link
Contributor

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:

  1. webpack.js.org
  2. That project's Github page
  3. The npm registry.
    If not, that's cool. I'd just want to know where to submit PRs so that everything is consistent.

Thanks!

@bebraw
Copy link
Contributor

bebraw commented Apr 7, 2017

@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.

@ecarlisle
Copy link
Contributor

@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.

@MartinMuzatko
Copy link
Author

Thank you so much for putting so much heart and love into the documentation :)

@skipjack
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants