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
React 19でお手軽にCSS-in-JSを自作する
yukukotani
5
560
僕が思い描くTypeScriptの未来を勝手に先取りする
yukukotani
11
3k
Web技術を駆使してユーザーの画面を「録画」する
yukukotani
14
7.2k
Capacitor製のWebViewアプリからReact Native製のハイブリッドアプリへ
yukukotani
5
1.3k
Real World Type Puzzle and Code Generation
yukukotani
4
870
Kuma UI が提唱する Hybrid Approach CSS-in-JS の仕組み
yukukotani
2
520
GraphQLスキーマ設計の勘所
yukukotani
42
17k
既存Webサービスのモバイルアプリ版を 1週間でリリースし、進化させてきた話
yukukotani
0
720
先を見据えたMVPのフロントエンド開発
yukukotani
0
300
Other Decks in Programming
See All in Programming
良いユニットテストを書こう
mototakatsu
11
3.6k
shadcn/uiを使ってReactでの開発を加速させよう!
lef237
0
300
オニオンアーキテクチャを使って、 Unityと.NETでコードを共有する
soi013
0
370
盆栽転じて家具となる / Bonsai and Furnitures
aereal
0
1.8k
DevinとCursorから学ぶAIエージェントメモリーの設計とMoatの考え方
itarutomy
0
140
Package Traits
ikesyo
1
210
DMMオンラインサロンアプリのSwift化
hayatan
0
180
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.2k
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
9
2.4k
ゼロからの、レトロゲームエンジンの作り方
tokujiros
3
1k
Alba: Why, How and What's So Interesting
okuramasafumi
0
210
ESLintプラグインを使用してCDKのセオリーを適用する
yamanashi_ren01
2
240
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
173
51k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
570
Optimizing for Happiness
mojombo
376
70k
Practical Orchestrator
shlominoach
186
10k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
Building Applications with DynamoDB
mza
93
6.2k
Building Adaptive Systems
keathley
38
2.4k
Become a Pro
speakerdeck
PRO
26
5.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.4k
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