Why we need the --scripts-version command line option for create-react-app?

我只是一个虾纸丫 提交于 2020-12-15 05:20:41

问题


I am new to React and learning how to properly create new project. Then I came across --scripts-version when we create new project with such command:

create-react-app new-project --scripts-version

Why do we need to use --scripts-version?


回答1:


The tool create-react-app is basically a wrapper around a number of tools and configuration options stored in an npm package called react-scripts.

When you use the create-react-app command to create your React app, it uses react-scripts to set up your project.

The command line option --scripts-version is an advanced feature to change which version of react-scripts is used.

If you are not happy with the way create-react-app sets up your project, you can fork the react-scripts repository, change it and then use your version to create your React apps.



来源:https://stackoverflow.com/questions/57364042/why-we-need-the-scripts-version-command-line-option-for-create-react-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!