Description
While browsing webpack's devtool
section, I found this stub:
This section is pretty much just copied over from existing docs... imo more background is needed on the different types of source mapping, maybe via links to external sites that discuss the different types of source maps in more detail.
I agree 100%. For general users, most of them only know sourcemap is a mapping between transpiled and un-transpiled code, and allows them to debug in un-transpiled code.
I come to this section with one question:
Which one should I use?
Which boils down to:
- Which one work with Chrome/FF debugger?
- What's the major difference between each one?
However, I walked away with both questions unanswered, while having more questions:
devtool | build | rebuild | production | quality
------------------------------|-------|---------|------------|--------------------------
eval | +++ | +++ | no | generated code
cheap-eval-source-map | + | ++ | no | transformed code (lines only)
cheap-source-map | + | o | yes | transformed code (lines only)
cheap-module-eval-source-map | o | ++ | no | original source (lines only)
cheap-module-source-map | o | - | yes | original source (lines only)
eval-source-map | -- | + | no | original source
source-map | -- | -- | yes | original source
- What's the difference between generated/transformed?
- What's "lines only", and how does it affect me?
- What's your definition of quality? And how does the options differ in that aspect?
- What it means for yes/no in "production"? If I were to put webpack in production, I surely want to know what each option does technically.
- What's "cheap"?
Also, I was seeing people using webpack.SourceMapDevToolPlugin()
in webpack 2.0. How does that relate to this setting? Which one should I use?
I hope webpack team can keep these questions in mind while reworking on the doc.