title: Extract CSS for use in SSR (Vue.js)
body: <p>I have a vue.js app and it's bundled with webpack. I use the <code>vue-server-renderer</code> to render it on the server side. Everything works great there. In my webpack config i am using using the <code>ExtractTextPlugin</code>:</p>
  
  <pre><code>new ExtractTextPlugin({
    filename: `css/[name]${isProduction ? '.[hash]' : ''}.css`,
    allChunks: true
  })
  </code></pre>
  
  <p>If i use <code>allChunks: true</code> then i get a single css file an everything works. But in a big application that is not ideal. Now i have a bunch of CSS that is loaded and not being used on the page.</p>
  
  <p>If I set <code>allChunks: false</code> then I get a smaller initial file and the css for the current component is injected into the head on page load. This is almost what i want. But the problem here is if you are using SSR then you get the initial HTML in the page with no CSS, then when CSS loads everything gets rendered correctly.</p>
  
  <p>What i would like is during my SSR rendering functions i could get access to CSS for the current page and inject it into the head myself before returning to browser.</p>
  
  <p>I have tried to build a webpack loader, but i don't think this is right, and i had problems integrating with <code>css-loader</code>.</p>
  
  <p>I think it should be either an issue with <code>vue-loader</code> or <code>vue-server-renderer</code>. Not really sure where to go from here. So i guess i am looking for some guidance, has anyone else figured this out, or can point me to the right direction.</p>