windows下webpack:output filename not configured

module.exports={
    entry:{
        page:_dirname+'/app/main3.jsx'
    },
    output:{
        path: _dirname+'/build',
        filename: 'bundle.js'
    },
    module:{
        loaders :[
            {
                test : /\.js[x]?$/,
                exclude : /node_modules/,
                loader : 'babel-loader?presets[]=es2015&presets[]=react'
            }
        ]
    }
}

package.json中的scripts{"build":"webpack"}
npm run build就开始报错
Output filename not configured.

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "D:\mass\node\node.exe" "D:\mass\node\node_modules\npm\bin\npm-cli.js" "run" "build"
npm ERR! node v4.6.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! practice@1.0.0 build: webpack
npm ERR! Exit status 4294967295
npm ERR!
npm ERR! Failed at the practice@1.0.0 build script 'webpack'.
npm ERR! This is most likely a problem with the practice package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs practice
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls practice
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:

阅读 3.5k
2 个回答

我自己找到了。。。原来是webpack.config.js的文件名错了--

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题