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)
| 归档时间: |
|
| 查看次数: |
1500 次 |
| 最近记录: |