The Vue project optimizes the packaging of ElementUI through CDN

  1. In main-prod.js, comment out element-uithe code loaded on demand
  2. In index.htmlthe header area, element-uithe js and css styles loaded through CDN :
<!-- element-ui 的样式表文件 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css" />
<!-- element-ui 的 js 文件 -->
<script src="https://cdn.staticfile.org/element-ui/2.8.2/index.js"></script>

Guess you like

Origin blog.csdn.net/Jack_lzx/article/details/113977714