Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
602 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 Answer

0 votes
by (71.8m points)

看官网啊,写的很详细


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...