【发布时间】:2015-11-18 17:13:59
【问题描述】:
我当前的webpack.config 文件
module.exports = {
entry: "./entry.js",
output: {
devtoolLineToLine: true,
sourceMapFilename: "./bundle.js.map",
pathinfo: true,
path: __dirname,
filename: "bundle.js"
},
module: {
loaders: [
{ test: /\.css$/, loader: "style!css" }
]
},
};
我在这里阅读https://webpack.github.io/docs/configuration.html 并发现以下内容:
output.sourceMapFilename
[file] 被 JavaScript 文件的文件名替换。
[id] 被块的 id 替换。
[hash] 替换为编译的哈希值。
如你所见,我已经在上面添加了它,但是当我的 webpack watch 运行时,我没有看到地图文件?
这是怎么做到的?
【问题讨论】:
标签: javascript module webpack source-maps