{ debugger; ... chrome (-6ren">
gpt4 book ai didi

javascript - ES6 : No source code for webpack "cheap-module-eval-source-map" and "cheap-module-source-map" only ** WEBPACK FOOTER **

转载 作者:数据小太阳 更新时间:2023-10-29 04:49:08 35 4
gpt4 key购买 nike

它曾经有效。现在,当我添加一个断点时:

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

debugger;
...

chrome (53) 中的结果是:

breakpoint

我尝试使用它并将配置更改为 'cheap-module-source-map''eval-source-map''source - map '。现在只有 '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
}]
}
}

最佳答案

This answer不完全是修复——它等同于将 devtool 设置覆盖到不同的(较慢的)模式。

正确的修复已在 this pull request 中提交,您现在可以更新到包含它的 Webpack 1.14.0。

关于javascript - ES6 : No source code for webpack "cheap-module-eval-source-map" and "cheap-module-source-map" only ** WEBPACK FOOTER **,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39380095/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com