4
我想使用由WebClip Closure编译器生成的SourceMaps,但我不知道该怎么做。webpack +闭包编译器中的源映射
这里是我的WebPack配置:
const ClosureCompiler = require('google-closure-compiler-js').webpack;
module.exports = {
devtool: 'source-map',
entry: './src/app.js',
output: {
path: __dirname + "/build/",
filename: "bundle.js",
//sourceMapFilename: "./app.js.map",
},
plugins: [
new ClosureCompiler({
compiler: {
language_in: 'ECMASCRIPT5',
language_out: 'ECMASCRIPT5',
compilation_level: 'ADVANCED',
create_source_map: __dirname + './output.js.map'
},
concurrency: 3,
})
]
};
当我运行的WebPack,没有发生。为什么?我究竟做错了什么? 谢谢你的帮助。