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
260
支付宝小程序的开放架构
yiminghe
0
200
gitc2016 react based architecture
yiminghe
1
180
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
マルチモーダル非構造データとの闘い
shibuiwilliam
1
150
Babylon.js を使って試した色々な内容 / Various things I tried using Babylon.js / Babylon.js 勉強会 vol.5
you
PRO
0
200
TUNA Camp 2026 京都Stage ヒューリスティックアルゴリズム入門
terryu16
0
670
20260326_AIDD事例紹介_ULSC.pdf
findy_eventslides
0
400
スケーリングを封じられたEC2を救いたい
senseofunity129
0
140
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
最大のアウトプット術は問題を作ること
ryoaccount
0
270
JSTQB Expert Levelシラバス「テストマネジメント」日本語版のご紹介
ymty
0
110
【AWS】CloudTrail LakeとCloudWatch Logs Insightsの使い分け方針
tsurunosd
0
130
昔話で振り返るAWSの歩み ~S3誕生から20年、クラウドはどう進化したのか~
nrinetcom
PRO
0
140
MCPで決済に楽にする
mu7889yoon
0
170
Goビルドを理解し、 CI/CDの高速化に挑む
satoshin
0
100
Featured
See All Featured
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
250
Designing for humans not robots
tammielis
254
26k
The Language of Interfaces
destraynor
162
26k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
180
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
120
Building Applications with DynamoDB
mza
96
7k
Scaling GitHub
holman
464
140k
Music & Morning Musume
bryan
47
7.1k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
New Earth Scene 8
popppiees
2
2k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
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