View Code? Open in Web Editor
NEW
This project forked from handsomepear/bind-date-first
一二线相亲
JavaScript 36.44%
HTML 4.83%
Vue 47.10%
CSS 11.64%
bind-date-first's Introduction
bind-date
Project setup
Compiles and hot-reloads for development
Compiles and minifies for production
Run your tests
Lints and fixes files
build 优化方案
- 将库文件通过 CDN 方式引入,减少 vendor 文件的体积。完整流程:
- 在
public/indx.html
文件中将 vue、vue-router、axios
等第三方库的 JS 文件和 CSS 文件通过 script
标签和 link
标签的方式引入
- 在
vue.config.js
文件中配置 configureWebpack
中的 externals
字段,将那些不打包到 vendor 中的包声明一下
- 然后在代码中通过别名,也就是
externals
对象中的 key 直接引入包名即可
- 通过 webpack 插件
compression-webpack-plugin
对文件进行 GZIP 压缩
bind-date-first's People
Contributors
Watchers