Audience Questions and Aphrodite

In notebook:
FrontEndMasters Webpack Deep Dive
Created at:
2017-01-05
Updated:
2017-01-05
Tags:
Webpack libraries JavaScript

Q&A: service workers and hash names

It takes care of everything.
Offline module is great for prefetching. If you want to support browsers that don't support prefetching then the prefetch plugin can be useful. 

Q&A: why he chooses inline CSS in favor of SASS

Good occasion to present Aphrodite plugin

Aphrodite

Library for CSS in JSX. 
You no longer have to inline your styles. Also supports pseudo selectors. 
It works great with server rendering as well. 
He likes this style for the explicit coupling of resources for a component. 
You can use all your JavaScript to generate your CSS. So you can have variables, mixins, whatever. 

This is not Webpack dependent!

Need ​eval​ to get source maps with service workers

  // **** webpack.config.babel.js ****

...
devtool: ifProd('source-map', 'eval'),