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 - JSConf JP 2021
Search
Yuku Kotani
November 27, 2021
Programming
2
2.7k
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
Kuma UI が提唱する Hybrid Approach CSS-in-JS の仕組み
yukukotani
2
310
GraphQLスキーマ設計の勘所
yukukotani
39
15k
既存Webサービスのモバイルアプリ版を 1週間でリリースし、進化させてきた話
yukukotani
0
570
先を見据えたMVPのフロントエンド開発
yukukotani
0
240
Kotlin/JS の仕組み / How KotlinJS works
yukukotani
5
2.9k
Kotlin/JS イケイケフロントエンド開発 / Ikeike Frontend Development in KotlinJS
yukukotani
0
320
Other Decks in Programming
See All in Programming
Compose-View Interop in Practice (mDevCamp 2024)
stewemetal
0
160
Sheets API使ってみた
toshi0383
2
160
2 週間で Twitter Bot を作ってみた
contour_gara
0
760
PostmanでAPIの動作確認が楽になった話
h455h1
0
180
見た目から始める生産性向上
ikumatadokoro
10
1.3k
Fragment Composition of GraphQL
quramy
13
1.4k
#phpcon_odawara オープン・クローズドなテストフィクスチャを求めて / open closed test fixtures
77web
3
240
Tailwind CSSを本気でカスタマイズする方法
fsubal
14
5.5k
CDKコントリビュートの最初の壁を越えよう! -簡単issueの見つけ方-
badmintoncryer
3
190
ServerAction で Progressive Enhancement はどこまで頑張れるか? / progressive-enhancement-with-server-action
takefumiyoshii
6
400
Three ways to use AI on Android: The Good, the Bad and the Ugly
marxallski
0
100
単体テストを書かない技術 #phpcon_odawara
o0h
PRO
27
8.5k
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1025
450k
Bash Introduction
62gerente
605
210k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
7
1.3k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
12
1.5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
228
16k
Stop Working from a Prison Cell
hatefulcrawdad
267
19k
Documentation Writing (for coders)
carmenintech
61
4k
Code Reviewing Like a Champion
maltzj
515
39k
RailsConf 2023
tenderlove
8
550
Into the Great Unknown - MozCon
thekraken
14
1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
22
1.6k
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