问答详情
源自:1-2 Webpack 安装和命令行

输入webpack回车报错,显示配置文件错误

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.



何解??

提问者:碼農五花肉丶 2017-05-25 22:33

个回答

  • secert花花
    2017-05-26 10:15:14

    你配置的里面写的路径名有问题,而且默认的webpack配置文件名是webpack.config.js,你有webpack.config.js文件吗?你试试这样写呢

    module.exports = {
    	entry:'./src/script/main.js',
    	output:{
    		path: __dirname + '/dist/js',
    		filename:'bundle.js'
    	}
    }