Skip to content

Commit 6c3c76f

Browse files
sokraskipjack
authored andcommitted
wording and formating
1 parent ee6bbe1 commit 6c3c76f

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

Diff for: src/content/configuration/devtool.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Choose a style of [source mapping](http://blog.teamtreehouse.com/introduction-so
2626

2727
T> The webpack repository contains an [example showing the effect of all `devtool` variants](https://github.com/webpack/webpack/tree/master/examples/source-map). Those examples will likely help you to understand the differences.
2828

29-
T> Instead of using the `devtool` option you can also use the `SourceMapDevToolPlugin`/`EvalSourceMapDevToolPlugin` directly. It has more options. You must never use both `devtool` option and plugin!
29+
T> Instead of using the `devtool` option you can also use `SourceMapDevToolPlugin`/`EvalSourceMapDevToolPlugin` directly as it has more options. Never use both the `devtool` option and plugin together. The `devtool` option adds the plugin internally so you would end up with the plugin applied twice.
3030

3131
devtool | build | rebuild | production | quality
3232
------------------------------ | ----- | ------- | ---------- | -----------------------------
@@ -52,6 +52,7 @@ W> There are some issues with Source Maps in Chrome. [We need your help!](https:
5252

5353
T> See [`output.sourceMapFilename`](/configuration/output#output-sourcemapfilename) to customize the filenames of generated Source Maps.
5454

55+
5556
### Qualities
5657

5758
`bundled code` - You see all generated code as a big blob of code. You don't see modules separated from each other.
@@ -100,10 +101,16 @@ These options are typically used in production:
100101

101102
`(none)` (Omit the `devtool` option) - No SourceMap is emitted. This is a good option to start with.
102103

103-
`source-map` - A full SourceMap is emitted as a separate file. It adds a reference comment to the bundle so development tools know where to find it. Warning: You should configure your server to disallow access to the Source Map file for normal users!
104+
`source-map` - A full SourceMap is emitted as a separate file. It adds a reference comment to the bundle so development tools know where to find it.
105+
106+
W> You should configure your server to disallow access to the Source Map file for normal users!
107+
108+
`hidden-source-map` - Same as `source-map`, but doesn't add a reference comment to the bundle. Useful if you only want SourceMaps to map error stack traces from error reports, but don't want to expose your SourceMap for the browser development tools.
109+
110+
W> You should not deploy the Source Map file to the webserver. Instead only use it for error report tooling.
104111

105-
`hidden-source-map` - Same as `source-map`, but doesn't add a reference comment to the bundle. Useful if you only want SourceMaps to map error stack traces from error reports, but don't want to expose your SourceMap for the browser development tools. Warning: You should not deploy the Source Map file to the webserver. Instead only use it for error report tooling.
112+
`nosources-source-map` - A SourceMap is created without the `sourcesContent` in it. It can be used to map stack traces on the client without exposing all of the source code. You can deploy the Source Map file to the webserver.
106113

107-
`nosources-source-map` - A SourceMap is created without the `sourcesContent` in it. It can be used to map stack traces on the client without exposing all of the source code. You can deploy the Source Map file to the webserver. Warning: It still exposes filenames and structure for decompiling, but it doesn't expose the original code.
114+
W> It still exposes filenames and structure for decompiling, but it doesn't expose the original code.
108115

109116
T> When using the `uglifyjs-webpack-plugin` you must provide the `sourceMap: true` option to enable SourceMap support.

0 commit comments

Comments
 (0)