The problem of introducing the difference between vue and bootstrap in two ways

is the first way to download three files from bootstrap and put them in the static directory and then introduce three files into index.html?

<script type="text/javascript" src="static/css/jquery.min.js"></script>
<script type="text/javascript" src="static/css/bootstrap.js"></script>
<link rel="stylesheet" type="text/css" href="static/css/bootstrap.css">

the second way is to install

through npm.

when I refresh the page in the first way, all three files in Network will show how long it takes to load and it takes a total of three to install 100ms
Why didn"t you see these three files loaded in the second way? Is the actual loading time the same in both ways? Will the second kind be loaded every time it is refreshed?
also found that the first way will conflict with other ui libraries, such as element the second way will not be why? I don"t think I"ve ever seen anyone else use the first way

Oct.15,2021

the first is the way used by Yuanmou front-end developers in the ancient wild era, and the second is the way used by contemporary front-end developers, because npm is only available in recent years.
but it's essentially the same. After all, there are only a few loading methods for js and css .

  1. the second one does not see three files loaded because they are all packaged by the packaging tool.
  2. the actual load time has not been tested, but it may lead to different file sizes according to your referenced files, packaged tools, and optimized strategies. For example, when you are developing, you may refer directly to the source file and use your own tools to pack and compress it, instead of using .min file, then the size may be different and the loading time may be different. Whether the refresh will be reloaded or not has nothing to do with how it is referenced, but depends on the browser cache strategy.
  3. ui Library conflicts depend on the features of each ui library. The first one does not necessarily conflict, and the second does not necessarily conflict. If you have not used all the ui libraries, you cannot answer them. You can directly look at the code after direct drinking and the code after npm is installed and packaged. You can know after comparison.
  4. if you want to see the first kind of project, you have to look for an ancient project. After all, in modern times, no one uses wood drilling to get hot except the anchorman.

I used the first method. At that time, I just contacted the boss of vue, to specify that I would use adminlte, and I didn't know much about the packaging mechanism, and I also opened eslint, which caused some plug-ins to report errors directly into npm, and so on, so I used the first one. Conflicts are nothing more than the introduction of js,css.

Menu