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
2
2.9k
Bundle Side Optimization in Future JavaScript - JSConf JP 2021
JSConf JP 2021
Yuku Kotani
November 27, 2021
Tweet
Share
More Decks by Yuku Kotani
See All by Yuku Kotani
僕が思い描くTypeScriptの未来を勝手に先取りする
yukukotani
11
2.9k
Web技術を駆使してユーザーの画面を「録画」する
yukukotani
14
7.1k
Capacitor製のWebViewアプリからReact Native製のハイブリッドアプリへ
yukukotani
5
1.3k
Real World Type Puzzle and Code Generation
yukukotani
4
850
Kuma UI が提唱する Hybrid Approach CSS-in-JS の仕組み
yukukotani
2
510
GraphQLスキーマ設計の勘所
yukukotani
42
17k
既存Webサービスのモバイルアプリ版を 1週間でリリースし、進化させてきた話
yukukotani
0
710
先を見据えたMVPのフロントエンド開発
yukukotani
0
290
Kotlin/JS の仕組み / How KotlinJS works
yukukotani
5
3.1k
Other Decks in Programming
See All in Programming
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
210
tidymodelsによるtidyな生存時間解析 / Japan.R2024
dropout009
1
770
快速入門可觀測性
blueswen
0
340
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
130
Zoneless Testing
rainerhahnekamp
0
120
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
460
CSC305 Lecture 26
javiergs
PRO
0
140
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
440
MCP with Cloudflare Workers
yusukebe
2
220
17年周年のWebアプリケーションにTanStack Queryを導入する / Implementing TanStack Query in a 17th Anniversary Web Application
saitolume
0
250
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
300
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
1
140
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Rails Girls Zürich Keynote
gr2m
94
13k
Speed Design
sergeychernyshev
25
670
Facilitating Awesome Meetings
lara
50
6.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Raft: Consensus for Rubyists
vanstee
137
6.7k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
What's in a price? How to price your products and services
michaelherold
243
12k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Being A Developer After 40
akosma
87
590k
Making the Leap to Tech Lead
cromwellryan
133
9k
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