你可以在云端运行 WebpackDevServer 吗? [英] Can You Run WebpackDevServer In The Cloud?

查看:32
本文介绍了你可以在云端运行 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.

你不应该,但你可以.

这篇关于你可以在云端运行 WebpackDevServer 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆