本文介绍了Eject在Create React App中做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为它与直接使用webpack有关,因此具有更大的灵活性。但我不确定是否有人可以解释退出的含义。另外,弹出一个create react应用程序会有哪些后果?这样做不好吗?还是?

I think it has something to do with using webpack directly and therefore gives more flexibility. But I'm not completely sure if someone can explain what "ejecting" means. Also what are the ramifications of ejecting a create react app? Is it bad to do this, or?

推荐答案

引导反应项目,您将需要了解诸如 Webpack Babel 之类的内容,对于那些不想了解这些内容的人来说,这可能是一个症结所在。

To bootstrap a react project it will require for you to know about things like Webpack or Babel which might be a sticking point for people who do not want to learn about these.

create-react-app 提供一个具有合理默认值(并且可以扩展)的完全配置的环境。大多数与基础架构相关的工作对您都是隐藏的,只要其中一个相关软件包发生更改,这一切都会为您解决-仅需要更新 react-scripts

create-react-app provides a fully configured environment with reasonable defaults (and possible to extend). Most infrastructure-related work is hidden from you, and whenever there are changes in one of the dependent packages this is taken care of for you -- it will only be required to update react-scripts.

我强烈建议,它将使您对该项目有更好的了解。

I highly recommend this presentation by one of CRA authors it will give you a better idea of the project.

现在,弹出表示所有配置将向您公开。您将看到运行项目的每个软件包。 现在,您负责维护所有配置

Now eject means that all of the configuration will be exposed to you. You will see every package which runs your project. Now you are responsible for maintaining all of that configuration.

这不一定是一件坏事;这样,您就剩下更多代码可以维护了,但是您得到了完全的控制权。

This is not necessarily a bad thing; you are then left with more code to maintain, but you get full control in return.

这篇关于Eject在Create React App中做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 08:50