ES6: only source code for the web package "cheap-module-eval-source-map" and "cheap module-source-map" ** WEBPACK FOOTER **

He worked. Now when I add a breakpoint:

saveSnippet: (title, imageUrl, role) => { debugger; ... 

Chrome Result (53):

breakpoint

I tried playing with it and changing the configuration to 'cheap-module-source-map' and 'eval-source-map' and 'source -map . Now only 'eval-source-map' and 'source-map' work .

Webpack.config.js (Webpack 1.13.2):

  var path = require('path') var webpack = require('webpack') var CompressionPlugin = require("compression-webpack-plugin"); module.exports = { debug: true, pathinfo:true, devtool: 'cheap-module-eval-source-map', entry: [ 'webpack-hot-middleware/client', './app/index' ], output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js', publicPath: '/static/' }, plugins: [ new webpack.optimize.OccurrenceOrderPlugin(), new webpack.HotModuleReplacementPlugin(), new CompressionPlugin({ asset: "[path].gz[query]", algorithm: "gzip", test: /\.js$|\.css$|\.html$/, threshold: 10240, minRatio: 0.8 }) ], module: { loaders: [{ test: /\.js$/, loaders: ['babel'], exclude: /node_modules/, include: __dirname }] } } 
+7
javascript webpack babeljs
source share
2 answers

This answer is not an exact fix, which is equivalent to overriding the devtool parameter in a different (slower) mode.

The correct fix was introduced in this porting request , and now you can upgrade to Webpack 1.14.0, which includes it.

+1
source share

Try adding:

 new webpack.EvalSourceMapDevToolPlugin() 

to the plugins section in the webpack configuration.

+1
source share

All Articles