About the difference between devdependcies and dependencies after webpack packaging?

generally speaking, the difference between dependencies and devdependencies is that the packages you need to rely on after launch are placed in devdependencies (such as wepack) when you develop dependenci,.

but I have a question, for example, after React, is compiled by webpack and babel, it becomes js, and can be run directly in the browser (as I understand it).

then you should not rely on React, after launch. Why do you usually put react in dependencies?

here are some reference links:
https://stackoverflow.com/que.

Jan.23,2022

will be put into the package in dependencies, and react will be packaged in your project js file. And some tools help to compile, such as webpack, all kinds of loader, babel are put in devdependcies, because it is impossible for you to pack the whole webpack,loader into your js file, right?

Menu