Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Webpack 网页中的源地图+;闭包编译器_Webpack_Google Closure Compiler_Source Maps - Fatal编程技术网

Webpack 网页中的源地图+;闭包编译器

Webpack 网页中的源地图+;闭包编译器,webpack,google-closure-compiler,source-maps,Webpack,Google Closure Compiler,Source Maps,我想使用Webpack使用闭包编译器生成的SourceMaps,但我不知道怎么做 这是我的网页配置: const ClosureCompiler = require('google-closure-compiler-js').webpack; module.exports = { devtool: 'source-map', entry: './src/app.js', output: { path: __dirname + "/build/",

我想使用Webpack使用闭包编译器生成的SourceMaps,但我不知道怎么做

这是我的网页配置:

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时,什么都没有发生。为什么?我做错了什么?
感谢您的帮助。

使用最新版本的google closure compiler js(
20170910.0.1
),我可以使用以下选项使其工作:

plugins: [
  new ClosureCompiler({
    options: {
      languageIn: 'ECMASCRIPT6',
      languageOut: 'ECMASCRIPT5',
      compilationLevel: 'ADVANCED',
      createSourceMap: true
    }
  })
]