Webpack and Code-Splitting for Phoenix

Webpack and Code-Splitting for Phoenix

Lightening talk at ElixirLDN '16.
Code examples: https://gist.github.com/svileng/87bd85b23586fe166342adcb9831874e

03844b74ab22ee502c01c1d888f3e454?s=128

Svilen Gospodinov

September 22, 2016
Tweet

Transcript

  1. WEBPACK AND CODE-SPLITTING ⛏ for Phoenix

  2. Svilen Gospodinov Co-Founder & CTO @svileng Engineers wanted! heresy.io

  3. None
  4. Brunch Webpack • Small, concise config file • Easier to

    use and quicker to start with • Long and verbose configuration • Fine-grain control and highly configurable TWO POINT COMPARISON
  5. CODE-SPLITTING

  6. webpack --color --display-chunks --display-modules

  7. plugins: [ new webpack.optimize.CommonsChunkPlugin({ children: true, async: true }) ]

  8. None
  9. None
  10. /login /dashboard /account

  11. MORE PROFIT Chunks do not have ?vsn=d which prevents caching!

  12. Thank you! @svileng