No configuration file found and no output filename configured via CLI option.
A configuration file could be named 'webpack.config.js' in the current directory.
Use --help to display the CLI options.
//commonjs的模块化
module.exports = {
//打包的入口文件路径
entry: './src/script/main.js',
//输出文件的路径
output: {
//输出文件的路径
path: './dist/js',
//输出文件的名字
filename: 'bundle.js'
}
}
文件名是 webpack.config.js 看看是不是写错了,还有这个文件要放在package.json 文件夹