Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SSRを避けるためにやっていること / ssr-alternative

297a42b94a1bda236982ec1cd81089b6?s=47 mottox2
December 09, 2019

SSRを避けるためにやっていること / ssr-alternative

Ginza.js #7の発表資料です

297a42b94a1bda236982ec1cd81089b6?s=128

mottox2

December 09, 2019
Tweet

More Decks by mottox2

Other Decks in Programming

Transcript

  1. None
  2. Gatsby, Gridsome, Next.js, etc … JSX pptx お仕事 Watching mottox2

    @ ؿٔ٦ٓٝأ8FCؒٝآص، ⾃⼰紹介 ひとこと
  3. #ginzajs

  4. #ginzajs 最近のお気もち SSRやりたくない ‣ ‣ Hosting Function ⾒ ‣ TTFB

    ‣ ‣ ‣
  5. #ginzajs SSR/SPA ‣ SSR SPA hydration ‣ Next.js Nuxt.js

  6. #ginzajs そもそもなぜSSR/SPAだったのか? ‣ SSR Consumer ‣ ‣ SPA ‣ DX

    ‣ SEO SNS ‣ SSR ‣ SPA ‣ SSR
  7. #ginzajs SPA+SSRは開発者体験‧開発速度に寄与するか? ‣ SSR ‣ DX SPA SSR ‣ Laravel

    Rails ‣ pjax Rails Turbolinks DXが良い DXが悪い SPAによるDX SSRによるDX 全体としてDXはよくなっているのか?
  8. #ginzajs じゃあ、どうするか? ‣ SSR DX ‣ SSR ‣

  9. #ginzajs 解決するべき課題 1 . SEO 2 . SNS OGP 3

    . Lambda@Edge Prerendering Google
  10. #ginzajs なぜ表⽰速度? ‣ ‣ index.html ‣ JS <!doctype html> <html

    lang="en"> <head> <meta charset="utf-8" /> <link rel="icon" href="/favicon.ico" /> <meta name="viewport" content="width=device-widt <meta name="theme-color" content="#000000" /> <meta name="description" content="Web site creat <link rel="apple-touch-icon" href="/logo192.png" <link rel="manifest" href="/manifest.json" /> <title>React App</title> <link href="/static/css/main.d1b05096.chunk.css" </head> <body><noscript>You need to enable JavaScript to r <div id="root"></div> <script><!— !! —></script> <script src="/static/js/2.6c6eb89e.chunk.js"></s <script src="/static/js/main.e41c5136.chunk.js"> </body> </html> SPA HTML表⽰後 JS実⾏後
  11. #ginzajs なぜ表⽰速度? ‣ Twitter ‣ ‣ B ‣ ‣ ‣

    2 ‣ C ‣ ServiceWorker 2 ‣ ‣ SSR
  12. #ginzajs 改善の⽅針 1 . JS Code Splitting 2 .

  13. #ginzajs バンドルサイズの削減 1 ‣ SPA JS jQuery ‣ JS ‣

    ‣ CodeSplitting ‣ Next.js Nuxt.js JS ‣ Lighthouse ‣
  14. #ginzajs HTMLのプリレンダリング 2 ‣ Lighthouse PageSpeed Insight ‣ HTML ‣

    JS HTML
  15. #ginzajs HTMLのプリレンダリング 2 ‣ SPA HTML ‣ react-snapshot create-react-app ‣

    Static HTML export Next.js ‣ Gatsby
  16. #ginzajs HTMLのプリレンダリング - 戦略 2 ‣ ‣ `/posts` `/posts/:id` ‣

  17. #ginzajs HTMLのプリレンダリング - 応⽤ 2 ‣ Skeleton ‣ ‣

  18. #ginzajs ありそうな質問 ‣ ‣ Next.js (without SSR) ‣ CDN Lighthouse

    Performance 90 ‣ SEO ‣ ‣
  19. #ginzajs ありそうな質問 ‣ ‣ Next.js (without SSR) ‣ CDN Lighthouse

    Performance 90 ‣ SEO ‣ ‣
  20. #ginzajs まとめ ‣ SSR ‣ SSR

  21. #ginzajs フレームワークに乗りたい ‣ Next.js Nuxt.js ‣ ‣ ‣ SSR ‣

    ‣ webpack.con fi g.js ‣ ‣ Appendix
  22. #ginzajs Next.jsの最適化に注⽬ ‣ ‣ Next.js Chrome ‣ ‣ async/await Poly

    fi ll ‣ Code Splitting ‣ ⾒ commons chunk ‣ Static HTML Export話 Appendix
  23. Thank you! 201 9 . 1 2 . 9 Ginza.js

    # 7 / @mottox 2