webpack-dev-server --port 现在不能直接运行了吗
本文介绍了webpack-dev-server --port 现在不能直接运行了吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
以前直接到projectX
目录运行
X:\project> webpack-dev-server --port 8080 --host 127.0.0.1
这样可以很方便就打开服务器了:127.0.0.1:8080,并且列出了该目录下的所有文件
现在却提示需要配置文件:
No configuration file found and no entry configured via CLI option.
When using the CLI you need to provide at least two arguments: entry and output.
A configuration file could be named 'webpack.config.js' in the current directory.
Use --help to display the CLI options.
请问还能不能向以前那样不要配置文件然后打开服务器呢?
或者配置文件应该怎么写呢?(并能把根目录下的目录和文件列出来)
解决方案
看官网啊,写的很详细
这篇关于webpack-dev-server --port 现在不能直接运行了吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文