javascript - windows下webpack:output filename not configured
大家讲道理
大家讲道理 2017-04-11 10:37:09
[JavaScript讨论组]
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:

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

全部回复(1)
迷茫

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

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号