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的文件名错了--