Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
608 views
in Technique[技术] by (71.8m points)

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.

请问还能不能向以前那样不要配置文件然后打开服务器呢?

或者配置文件应该怎么写呢?(并能把根目录下的目录和文件列出来)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

看官网啊,写的很详细


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...