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
Metro Bundler in Web
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Daiki Ihara
February 21, 2019
Technology
1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Metro Bundler in Web
【第2回】ReactNativeにゆかりのあるスタートアップが集う会
Daiki Ihara
February 21, 2019
More Decks by Daiki Ihara
See All by Daiki Ihara
tc39_study
sasurau4
1
790
ArrayBufferとBinary
sasurau4
1
660
CLIから見るAngular, React, Vue
sasurau4
1
990
reading-mtc2018-web.pdf
sasurau4
1
580
Other Decks in Technology
See All in Technology
DMMブックスのNext.js化を加速させるAI活用 / Migrating DMM Books to Next.js with AI
kentarom
1
330
Kiro Crewしか勝たん!?
miu_crescent
PRO
0
170
コスト最適化の「めんどくさい」を AWS FinOps Agent でチョット楽にする
classmethod_kaz
0
100
Genie Code ワークショップ 応用編 / Genie-Code-Workshop-advanced
databricksjapan
PRO
0
310
V8コントリビュート超入門
riyaamemiya
0
130
When Does a Local Qwen Start to Break
morshoto
0
170
Redmine 7.0で私が開発した新機能の狙いと背景
vividtone
1
110
Azure App Service / Container Apps の組み込み認証
kuniteru
0
190
KAEN Company Deck
kaen
PRO
0
300
Hub & Spoke 環境のネットワークルーティングを分解してみる
tsuyataku
1
520
どんな手を使っても絶対間に合わせるスケジューラ
asari194617
0
1.6k
Bet AI Day 2026丨Production-Ready AI Agents — エンタープライズの実務を任せるための設計と運用
layerx
PRO
3
2k
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Code Review Best Practice
trishagee
74
20k
Accessibility Awareness
sabderemane
1
200
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
400
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
410
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Transcript
Metro Bundler in Web by sasurau4 【第2回】ReactNativeにゆかりのあるスタートアップが集う会 at maricuru
• Name: Daiki Ihara • ID: @sasurau4 • Job: React
Native / Server Side Kotlin / GraphQL • Hobby: React, JavaScript, TypeScript 自己紹介
今日の話題 Metro Bundler in Web
What’s Metro Bundler The JavaScript Bundler for React Native •
元々、react-native repositoryが抱えてたが改善のために2017中頃に別repo にしたもの • Webで言うところのWebpackやParcel https://github.com/facebook/metro
Metro’s Website
Why Metro Bundler in Web
衝撃の事実 • Vincent Riemer: The Creator of React Native DOM
• Christoph Nakazawa: Engineering Manager at Facebook • Glenn Conner: Tech lead for web foundation @instagram https://twitter.com/vincentriemer/stat us/1088628642970783744?s=20
やってみた https://github.com/sasurau4/sample-metro-bundler-in-web
デモ
やってること • expressでstaticなファイルを配信するserverを立てる • expressにmetroをmiddlewareとして組み込む ◦ index.bundle?platform=web&dev=true&minify=false のようなパスでbundleを取得できる • babel.config.jsに設定を書く
• index.htmlを書く ◦ scriptタグでbundleを直接指定
ハマったこと • bundle scriptをheadタグで読み込んで失敗していた • import/export/fromの構文が、まだTC39のstage-1だった • assetsが取れない(未解決)
まとめ • WebでもMetro Bundlerは使える • Webpackは偉大 • 実戦投入の機会はなさそう