You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/configuration/devtool.md
+11-4
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ Choose a style of [source mapping](http://blog.teamtreehouse.com/introduction-so
26
26
27
27
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.
28
28
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.
@@ -52,6 +52,7 @@ W> There are some issues with Source Maps in Chrome. [We need your help!](https:
52
52
53
53
T> See [`output.sourceMapFilename`](/configuration/output#output-sourcemapfilename) to customize the filenames of generated Source Maps.
54
54
55
+
55
56
### Qualities
56
57
57
58
`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:
100
101
101
102
`(none)` (Omit the `devtool` option) - No SourceMap is emitted. This is a good option to start with.
102
103
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.
104
111
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.
106
113
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.
108
115
109
116
T> When using the `uglifyjs-webpack-plugin` you must provide the `sourceMap: true` option to enable SourceMap support.
0 commit comments