webpack无法识别输出文件名

问题描述:

以下是我的webpack.config.js。我指定了一个输出文件名,但是我仍然收到错误throw new Error("'output.filename' is required, either in config file or as --output-filename")webpack无法识别输出文件名

/public director是否需要存在或将webpack创建一个?

module.export = { 
    entry: [ 
     '/ts/main.ts', 
     '/ts/vendor.ts' 
    ], 
    output:{ 
     path: __dirname+'/public', 
     filename:'[name].bundle.js' 
    }, 
    rules: 
     { 
      test:'/\.ts$/', 
      loader:'awesome-typescript-loader' 
     } 
} 

module.exports最后是s

module正在加载,但的WebPack没有找到任何东西(即配置)出口,所以不会加载output,从来没有看到filename结果。

这是一些更详细的信息on the nodejs module loader