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
cheap-module-eval-source-map | o | ++ | no | 原始源码(仅限行)
24
24
cheap-module-source-map | o | - | yes | 原始源码(仅限行)
25
25
eval-source-map | -- | + | no | 原始源码
26
26
source-map | -- | -- | yes | 原始源码
27
-
nosources-source-map | -- | -- | yes | 无源码内容
27
+
nosources-source-map | -- | -- | yes | 无源码内容
28
28
29
-
Some of these values are suited for development and some for production. For development you typically want fast Source Maps at the cost of bundle size, but for production you want separate Source Maps that are accurate.
`eval` - Each module is executed with `eval()`and`//@ sourceURL`. This is pretty fast. The main disadvantage is that it doesn't display line numbers correctly since it gets mapped to transpiled code instead of the original code.
`eval-source-map` - Each module is executed with `eval()`and a SourceMap is added as a DataUrl to the `eval()`. Initially it is slow, but it provides fast rebuild speed and yields real files. Line numbers are correctly mapped since it gets mapped to the original code.
`cheap-module-eval-source-map` - Like`eval-source-map`, each module is executed with `eval()`and a SourceMap is added as a DataUrl to the `eval()`. It is "cheap" because it doesn't have column mappings, it only maps line numbers.
`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.
`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.
Configure how source maps are named. By default `"[file].map"` is used.
442
441
443
-
Technically the `[name]`, `[id]`, `[hash]` and `[chunkhash]`[placeholders](#output-filename) can be used, if generating a SourceMap for chunks. In addition to that the `[file]` placeholder is replaced with the filename of the original file. It's recommended to only use the `[file]` placeholder, as the other placeholders won't work when generating SourceMaps for non-chunk files. Best leave the default.
0 commit comments