Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the SourceMapDevToolPlugin configuration equivalent for devtool:cheap-module-eval-source-map

Are there are any examples of how to configure SourceMapDevToolPlugin to match the various devtool sourcemap options.

For example, what is the SourceMapDevToolPlugin configuration equivalent for devtool:cheap-module-eval-source-map I'm trying to configure the plugin to map the various options for devtool.

like image 907
Isabel Inc Avatar asked Aug 17 '18 00:08

Isabel Inc


People also ask

What is Devtool source map?

Source Maps The Chrome dev tools support source maps, which allow you to debug transpiled JavaScript code as their original source language. This may include TypeScript, CoffeeScript, ClojureScript, or ECMAScript 6.

What is Sourcemapdevtoolplugin?

This plugin enables more fine grained control of source map generation. It is also enabled automatically by certain settings of the devtool configuration option.

What is inline Sourcemap?

Inline source map This is a special comment placed in your normal JavaScript file to tells your browser how to link the compiled code to the original version.

What is source map loader?

The source-map-loader extracts existing source maps from all JavaScript entries. This includes both inline source maps as well as those linked via URL. All source map data is passed to webpack for processing as per a chosen source map style specified by the devtool option in webpack. config. js.


1 Answers

For posterity (I was looking for this too):

I think the OP is looking for EvalSourceMapDevToolPlugin which is the plugin for eval-sourcemap functionality. The equivalent should be:

new webpack.EvalSourceMapDevToolPlugin({ columns: false });

reference documentation: https://webpack.js.org/plugins/eval-source-map-dev-tool-plugin/

like image 142
Paul Fox Avatar answered Sep 17 '22 13:09

Paul Fox