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
yiminghe
February 21, 2014
Technology
1
1.7k
kissy modularization part2
part2 of kissy modularization tutorials
yiminghe
February 21, 2014
Tweet
Share
More Decks by yiminghe
See All by yiminghe
小程序终端技术架构
yiminghe
0
250
支付宝小程序的开放架构
yiminghe
0
200
gitc2016 react based architecture
yiminghe
1
170
antd at qcon2016
yiminghe
1
240
react-based architecture
yiminghe
2
170
React Ecosystem At Ant Financial
yiminghe
4
2.3k
ant design preview
yiminghe
1
320
react best practice
yiminghe
3
220
react at alipay
yiminghe
43
4.5k
Other Decks in Technology
See All in Technology
Amazon S3 Vectorsを使って資格勉強用AIエージェントを構築してみた
usanchuu
3
440
Azure Durable Functions で作った NL2SQL Agent の精度向上に取り組んだ話/jat08
thara0402
0
160
学生・新卒・ジュニアから目指すSRE
hiroyaonoe
2
570
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
180
使いにくいの壁を突破する
sansantech
PRO
1
130
ブロックテーマ、WordPress でウェブサイトをつくるということ / 2026.02.07 Gifu WordPress Meetup
torounit
0
160
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
420
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
42k
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.8k
30万人の同時アクセスに耐えたい!新サービスの盤石なリリースを支える負荷試験 / SRE Kaigi 2026
genda
3
980
CDK対応したAWS DevOps Agentを試そう_20260201
masakiokuda
1
220
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.4k
Featured
See All Featured
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
160
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
180
Chasing Engaging Ingredients in Design
codingconduct
0
110
Embracing the Ebb and Flow
colly
88
5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
My Coaching Mixtape
mlcsv
0
47
From π to Pie charts
rasagy
0
120
Producing Creativity
orderedlist
PRO
348
40k
Site-Speed That Sticks
csswizardry
13
1.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
200
Abbi's Birthday
coloredviolet
1
4.7k
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