你可以在云端运行 WebpackDevServer 吗?

问题描述:

使用 ReactJS 应用程序时,您可以使用 npm start 在本地运行它.

When using a ReactJS application you run it locally with npm start.

这最终会调用使用 WebpackDevServer 的 react-scripts start.

This ends up calling react-scripts start, which uses the WebpackDevServer.

文档说你不应该将开发服务器用于生产.

The documentation says that you shouldn't use the dev server for production.

不在生产中运行它的原因 主要是安全性、混淆、缩小、大小等.

The reasons for not running it in production are mostly security, obfuscation, minification, size etc.

但是,是否有任何技术原因意味着您不能在服务器上使用它?

However, is there any technology reason that means you can't use it on a server?

即如果您忽略运行开发服务器的所有问题,它是否仍会实际提供页面并可以从网页访问?

i.e. if you ignore all the issues with running the dev server, will it still actually serve the pages and be accessible from a web page?

当然,你可以在那里运行它 - 你只需要设置它.

Sure, you can run it there - you just have to set it up.

你不应该,但你可以.