node.js - Problem with development environment and production environment in package.json?
世界只因有你
世界只因有你 2017-05-16 13:45:42
0
1
814

Regarding using node to generate a package.json configuration file, does it cause a problem for the development environment and production environment inside?

Some explanations from the Internet said that we need some dependencies during development, but they are not needed during production (product launch),

So if we use webpack, we can not package these dependencies.

Then the question is, what dependencies do not need to be packaged?

For example, those dependencies that cause code errors, I can understand this, but why are some conversions such as babel, css-loader, style-loader Are the dependencies not packaged?

If they are not packaged, when we use webpack to package them, they are not converted into something that the browser can recognize, then it won’t work?

世界只因有你
世界只因有你

reply all(1)
仅有的幸福

Your so-called babel(编译js),css-loader(编译css)这些的东西,早都在你build的时候编译好了,而打包所做的是兼容amd cmd CommonJses6 module specification integrates js files imported from different specifications, which will not cause any problems that cannot be recognized by the production environment.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template