Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
A robust architecture of building front-end res...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Narihiro Nishimura
December 08, 2018
Programming
26
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
A robust architecture of building front-end resources in Rails application
Railsdm day4での発表内容
Narihiro Nishimura
December 08, 2018
Other Decks in Programming
See All in Programming
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
970
すこし踏み込む CancellationToken
htkym
2
1.7k
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
430
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
180
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
170
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
Featured
See All Featured
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
280
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
500
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
Writing Fast Ruby
sferik
630
63k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
410
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Mobile First: as difficult as doing things right
swwweet
225
10k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Transcript
!#$"
Who am I ??? (Narihiro Nishimura) @engine_NN @nishimuraNN Sansan
(2017.9 ~) Eight web
Who am I ??? (Narihiro Nishimura) @engine_NN @nishimuraNN Sansan
(2017.9 ~) Eight web Android
What is ‘Eight’ ??? 200 SNS
Rails
- Web=Eight1BSPA5: (,-1B#!'1B )-"-(9) - &,-#* <?@sprockets.; -
A4assets:precompile86 %+$2 >C - Backbone → React/603SPA1B7jswebpack %+$6
front app/assets hoge.js hoge.js fuga.css Amazon S3 index.html yarn
run build assets precompile
" front app/assets hoge.js hoge.js fuga.css Amazon S3 index.html
yarn run build assets precompile ! ) ! js #% ! js css ! Rails ' ! $((20&) !
# front app/assets hoge.js hoge.js fuga.css Amazon S3 index.html yarn
run build assets precompile " - ! js $) ! js css ! Rails !+ ! '(,20*) ! %&!! %(&!!
webpack 1
webpack 1 1 2
3 - 3 - 3 13
- ! 20+ 20+ 10+view
webpack 1 5 1
- app/assets 61 web image 1 js 1 -
webpack.config
webpack 1 1 7
- 1 8 → bundle webpack digest 8 sprockets
- digest 8 8 8 sprockets 8 → webpack-dev-server
(production) front app/assets hoge.js bundle.js fuga.css Amazon S3 index.html
yarn run build assets precompile (digest) bundle.css
(development) front app/assets hoge.js bundle.js fuga.css index.html bundle.css
localhost:4000 yarn run build -env.dev
- js css 2 webpack - 1 - assets:precompile
3 SPA 2
4 SPA 2
- digest webpack → webpack-manifest-plugin - 5
S3 5 webpack → 5 2 5 manifest.json S3
SPA 6 2
7 2 10 10
webpack-s3-plugin yarn install yarn run build --env.release #{frontend_env} rm
#{node_modules_dir} aws s3 cp ./front/.build s3://#{bucket_name}/assets/webpack --recursive
front app/assets hoge.js static.js fuga.css Amazon S3 index.html yarn
run build assets precompile static.css manifest1.json manifest2.json
- → 20 6 0 3 - SPA assets:precompile
3 Rails -
- - 3 - 1
you!!
We’re hiring!!