ES6:没有webpack的源代码"cheap-module-eval-source-map"和"cheap-module-source-map"只有**WEBPACK FOOTER**

Guy*_*Guy 7 javascript webpack babeljs

它曾经工作过.现在当我添加一个断点时:

saveSnippet: (title, imageUrl, role) => {

        debugger;
        ...
Run Code Online (Sandbox Code Playgroud)

chrome(53)的结果是:

断点

我决定去体验一下,并改变配置,以"便宜模块源地图""EVAL-源图""源图".现在只有'eval-source-map''source-map'工作.

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
      }]
    }
  }
Run Code Online (Sandbox Code Playgroud)

Dan*_*mov 1

这个答案并不完全是修复\xe2\x80\x94it\相当于覆盖devtool为不同的(较慢的)模式。

\n\n

在此拉取请求中提交了正确的修复,您现在可以更新到包含该修复的 Webpack 1.14.0。

\n