Why can vue-router not be put into production environment?

shouldn"t vue use vue-router? Why can it only be put into devDependencies (development dependency)?


vue-router uses npm install-- save

url-loader uses npm install-- save-dev

url-loader is a tool for developing products, and vue-router is the material for products, just like you are a carpenter, url-loader is a wrench, and vue-router is a wood material used to build wardrobes, so people like url-loader should use-- save-dev


< H2 > devDependencies < / H2 >
if someone plans to download and use your module in their program, they may not want or need to download and build the external test or documentation framework you use.

in this case, it is best to map these add-ons to devDependencies objects.

translated from: https://docs.npmjs.com/files/.

if your module does not need to be published to npm for others to install, it will be the same anywhere.


shouldn't vue-router be used in vue?

vue never stipulates that vue-router must be used, just like vuex , but vue-router is used for page jump convenience (especially SPA),), and vue-router is optional when vue-cli initializes.

as to why I put it in devDependencies , it means that I put it all into dependencies in my development, otherwise it won't affect me after build?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b30b9c-e288.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b30b9c-e288.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?