lastpoem / questions-study Goto Github PK
View Code? Open in Web Editor NEWThe questions I met and my receipt
The questions I met and my receipt
在看贵州水保项目的时候发现了这样的代码:
component: resolve =>
require([
"../components/page/engineerMng/projectMng/projectMng"
], resolve),
而之前自己写的时候都是:
component: () => import("./components/RegisterForm/RegisterForm.vue")
两种方式都能引入组件到路由中,但是是有区别的。
import 这种方式引入的话,在项目打包时会把所有的component都打包到一个js文件里。这样就会造成在进入首页时需要加载的东西过多,浪费时间,体验不行。
而用require这种方式引入的时候,会把component分别打包成不同的js,加载的时候也是按需加载,只用访问这个路由网址时才会加载这个js。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.