javascript - windows下webpack:output filename not configured

查看:280
本文介绍了javascript - 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:

解决方案

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

这篇关于javascript - windows下webpack:output filename not configured的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆