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
Bundle Side Optimization in Future JavaScript -...
Search
Yuku Kotani
November 27, 2021
Programming
3.3k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Bundle Side Optimization in Future JavaScript - JSConf JP 2021
JSConf JP 2021
Yuku Kotani
November 27, 2021
More Decks by Yuku Kotani
See All by Yuku Kotani
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
5k
一億総業務改善を支える社内AIエージェント基盤の要諦
yukukotani
9
3.6k
MCPとデザインシステムに立脚したデザインと実装の融合
yukukotani
6
2.9k
Scale out your Claude Code ~自社専用Agentで10xする開発プロセス~
yukukotani
11
5.8k
AI Coding Agent Enablement in TypeScript
yukukotani
21
20k
AI Coding Agent Enablement - エージェントを自走させよう
yukukotani
14
8.5k
Expoによるアプリ開発の現在地とReact Server Componentsが切り開く未来
yukukotani
3
920
React 19でお手軽にCSS-in-JSを自作する
yukukotani
6
1.1k
僕が思い描くTypeScriptの未来を勝手に先取りする
yukukotani
12
3.6k
Other Decks in Programming
See All in Programming
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.5k
共通化で考えるべきは、実装より公開する型だった
codeegg
0
270
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.9k
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
270
act2-costs.pdf
sumedhbala
0
120
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
530
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
140
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
270
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.2k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
340
フィードバックで育てるAI開発
kotaminato
1
120
関数型プログラミングのメリットって何だろう?
wanko_it
0
180
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
First, design no harm
axbom
PRO
2
1.2k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
340
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
220
Optimizing for Happiness
mojombo
378
71k
Side Projects
sachag
455
43k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
370
Thoughts on Productivity
jonyablonski
76
5.3k
How to build a perfect <img>
jonoalderson
1
5.8k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
190
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Transcript
Bundle Side Optimization in Future JavaScript JSConf JP 2021 Yuku
Kotani (@MonchiFC)
2 Yuku Kotani (@MonchiFC) - Software Engineer @ Ubie Discovery
- AI https://ubie.app/ - TypeScript+Next.js / Kotlin+Spring Boot / GraphQL / Capacitor - Student (B3) @ - Blog https://yuku.dev 2
3 Web - - ECMAScript - - 3rd-party script
4 - (Dead Code Elimination) - (Mangling) - (Code Splitting)
- (Tree Shaking)
5 - (Dead Code Elimination) terser, Rollup - (Mangling) terser
- (Code Splitting) webpack, Rollup, Next.js, Nuxt - (Tree Shaking) webpack, Rollup
6 - (Dead Code Elimination) terser, Rollup - (Mangling) terser
- (Code Splitting) webpack, Rollup, Next.js, Nuxt - (Tree Shaking) webpack, Rollup
7 DDD
8 DDD
9 1st Approach: Dead Code Elimination
10 - - obj obj
11 TypeScript obj User obj isAdult getFullname getFullName
12 TS AST JavaScript TypeScript TS Compiler JS AST JavaScript
webpack JS AST DCE JavaScript terser JS ⾒
13 TS AST JavaScript TS Compiler JS AST JavaScript webpack
JS AST DCE JavaScript terser JS ⾒ TypeScript
14 TS AST JS JavaScript DCE SWC, Rome TypeScript
15 1 SWC Rome
16 2nd Approach: Tree Shaking
17 Tree Shaking JS/TS
18 Tree Shaking JS/TS A. - / `obj.method()` -
19
20 A. Bind-this operator
21 Bind-this operator func.bind() func.call() Stage-1 this JavaScript Bind Operator
https://yuku.dev/articles/2021-11-11/javascript-bind-this-op
22 Bind-this operator TypeScript This Parameter ⾒ This :: This
Parameter
23 2 ECMAScript
24 - class-based OOP - SWC Rome - ECMAScript JS-way
https://meety.net/matches/SwBiENIgCVFp