create-react-app install devDepencies in dependencies section

前端 未结 2 1726
-上瘾入骨i
-上瘾入骨i 2020-12-14 16:58

After creating a new project with create-react-app and running yarn eject.

The dependencies section of my package.json looks like this:

2条回答
  •  忘掉有多难
    2020-12-14 17:27

    These are all dev dependencies if the app you are building is a library, that you want to publish others to use.

    Basically my understanding is this, if you have a module that can be used in two ways:

    • Consumed via npm i
    • Developed via cloning the project

    In that scenario, it makes sense to put them in dev dependencies.

    In your case people are going to clone your project to develop. And consume it via hosted one.

    Hope this helps.!

提交回复
热议问题