I am using webpack to config the source map. I am wondering anyone could clarify the difference between "eval" and "eval-source-map" ? I don't see the difference personally.
From the documentation:
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 (No Source Maps from Loaders).
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. It yields the best quality SourceMaps for development.
Essentially eval-source-map
is slower, but has more accurate mapping to the original line numbers (helpful for identifying the appropriate lines of bugs in the original source code).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With