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
es module bundling with webpack 2
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
cjies
March 29, 2017
Technology
580
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
es module bundling with webpack 2
F2E&RGBA Meetup 三月號
cjies
March 29, 2017
More Decks by cjies
See All by cjies
git, let it flow!
cjies
9
2.3k
git flow
cjies
0
360
Other Decks in Technology
See All in Technology
[チョークトーク資料]AWS DevOps Agent を使いこなす / AWS Dev Ops Agent Chalk Talk AWS Summit Japan 2026
kinunori
4
770
AIが自律的に回る開発ループを設計してチーム開発に組み込む
nekorush14
0
130
When Platform Engineering Meets GenAI
sucitw
0
180
AWS Security Hub CSPMの成功・失敗体験
cmusudakeisuke
0
560
アラート調査向けAIエージェントの本番導入とその後/AI Agents for Alert Investigation: Production Deployment and After
taddy_919
1
170
AIネイティブな開発のサプライチェーンリスク対策 〜激動の開発現場でリスクに立ち向かう〜【ZennFes】
cscengineer
PRO
2
160
10年間のブログ発信を振り返って見えたWebアプリケーションエンジニアとしての軌跡
stefafafan
0
190
螺旋型キャリアの生存戦略 / kinoko-conf2026
rakus_dev
1
1k
AIはどのように 組織のアジリティを変えるのか?
junki
4
1.4k
千葉での単身赴任からAWSをやり続け、千葉に戻ってきた話
yama3133
1
120
【FinOps】データドリブンな意思決定を目指して
z63d
1
390
「ビジネスがわかるエンジニア」とは何か?
ryooob
0
330
Featured
See All Featured
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
200
First, design no harm
axbom
PRO
2
1.2k
GitHub's CSS Performance
jonrohan
1033
470k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
56k
KATA
mclloyd
PRO
35
15k
Producing Creativity
orderedlist
PRO
348
40k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Technical Leadership for Architectural Decision Making
baasie
3
420
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
For a Future-Friendly Web
brad_frost
183
10k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
260
Transcript
es module bundling with webpack 2 CJ 2017/03/29 F2E&RGBA Meetup
三⽉月號
CJies Tan front end n00b @ iCHEF cjies.com
webpack.js.org
webpack v2 stable released @ Jan 18
migrating to v2 https://webpack.js.org/guides/migrating/
webpack v2 features es6 support tree-shaking dynamic code-splitting build performance
improvement https://medium.com/webpack/webpack-2-and-beyond
es6 support no longer transpile import and export statements with
babel ["es2015", { "modules": false }]
tree-shaking • popularized by Rich Harris’ module bundler Rollup •
“mark” and drop unused exports • won’t work with CommonJS require https://blog.engineyard.com/2016/tree-shaking https://medium.com/@roman01la/dead-code-elimination-and-tree-shaking-in-javascript-build-systems
es ready libraries webpack 2 or rollup will resolve module
first if es6 supported { // commonJS entry "main": "lib/index.js", // es module entry "module": "es/index.js" } https://gist.github.com/cjies/31b602b53adf22320936663756abd61f https://github.com/rollup/rollup/wiki/pkg.module
tree-shaking demo https://github.com/cjies/tree-shaking-demo
issues to follow up webpack/webpack#2867 mishoo/UglifyJS2#1261
dynamic code-splitting
dynamic import() • webpack treats import() as a split-point. •
puts the request module in a separate chunk. • return a Promise.
https://webpack.js.org/guides/code-splitting-import/
react-async-component https://github.com/ctrlplusb/react-async-component
None
limitation of import() path // Wrong, no fully dynamic import(Math.random())
// ( Correct, support partially static import('./components/Product') import('./locale' + language + '.json')
$ exit thanks for your listening