Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
kissy modularization part2
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
yiminghe
February 21, 2014
Technology
1.7k
1
Share
kissy modularization part2
part2 of kissy modularization tutorials
yiminghe
February 21, 2014
More Decks by yiminghe
See All by yiminghe
小程序终端技术架构
yiminghe
0
280
支付宝小程序的开放架构
yiminghe
0
210
gitc2016 react based architecture
yiminghe
1
190
antd at qcon2016
yiminghe
1
240
react-based architecture
yiminghe
2
180
React Ecosystem At Ant Financial
yiminghe
4
2.3k
ant design preview
yiminghe
1
330
react best practice
yiminghe
3
230
react at alipay
yiminghe
43
4.5k
Other Decks in Technology
See All in Technology
Oracle Cloud Infrastructure IaaS 新機能アップデート 2026/3 - 2026/5
oracle4engineer
PRO
1
180
AI フレンドリーなエラー監視を TypeScript で実現する
shinyaigeek
2
250
「コーディング」しない人のための Claude Code 入門 ChatGPT の次の一歩 — 業務に組み込む 育成・共有・自動化
rfdnxbro
2
1.2k
新規事業を牽引する技術選定 〜フルスタックTypeScript開発の実践事例〜
nullnull
2
310
最低限これだけ押さえれ大丈夫_Claude Enterprise/Team企業展開ガバナンス入門
tkikuchi
1
770
AI と創る新たな世界 / A New World Created with AI
ks91
PRO
0
110
BigQuery の Cross-cloud Lakehouse への歩み
phaya72
2
540
AIを「創る」と「使う」の循環 — HRテックが実践するリアルなAI組織実装
taketo957
0
1.4k
AI活用を推進するために ファインディが下した、一つの小さな決断
starfish719
0
240
[モダンアプリ勉強会]今更聞けないGit/GitHub入門
tsukuboshi
0
240
AIガバナンス実践 - 生成AIコネクタのデータ漏洩リスクと実務対策
knishioka
0
180
Diagnosing performance problems without the guesswork
elenatanasoiu
0
160
Featured
See All Featured
Accessibility Awareness
sabderemane
1
130
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
580
KATA
mclloyd
PRO
35
15k
Unsuck your backbone
ammeep
672
58k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
150
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
550
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
4 Signs Your Business is Dying
shpigford
187
22k
Side Projects
sachag
455
43k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Ruling the World: When Life Gets Gamed
codingconduct
0
240
Transcript
KISSY Modularization part 2 - optimzation
[email protected]
之前浏览器下的问题 • 首屏闪烁 • 链接数过多
链接数
使用工具进行优化 • grunt-kmc • 合并文件 • 动态 combo
• 合并项目文件
合并文件 • 适合具备明确的入口文件 • Gruntfile.js
modules.js • 描述项目合并后文件外部依赖
index.js • 入口模块以及其依赖的本地模块
应用 • 引入 seed.js modules.js • 配置 combine true •
http://localhost:8111/?concat=1
• 动态 combo
动态 combo • 适合多入口或无入口应用或需要后期动态加载 • Gruntfile.js
Module.js • 包含项目所有的模块的内部依赖与外部依赖
应用 • 引入 seed.js modules.js • 配置 combine true •
http://localhost:8111/?combo=1
• 首屏闪烁
加载 css • 异步加载 css 造成闪烁
加载 css • 使用 importStyle 配置 modules.js 同步 combo 加载
css • 对首屏用到的所有模块调用 importStyle
大规模应用优化 • Gallery/mini 模块? • 打包进项目入口文件 • 动态 combo •
合并 gallery/mini 模块的 modules.js 到项目 modules.js