Skip to content

v0.6.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@Akryum Akryum released this 20 Oct 23:06
· 3 commits to master since this release

Breaking changes

  • Now require Node 8+
  • Now use a different html file (by default index.ssr.html) so spa serve still works.

In the public folder, make sure to have the following two files.

index.html:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title>vue-apollo-repro-48</title>
  </head>
  <body>
    <noscript>
      <strong>We're sorry but vue-apollo-repro-48 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>

index.ssr.html:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%%= BASE_URL %%>favicon.ico">
    <title>{{ title }}</title>
    {{{ renderResourceHints() }}}
    {{{ renderStyles() }}}
  </head>
  <body>
    <!--vue-ssr-outlet-->
    {{{ renderState() }}}
    {{{ renderState({ contextKey: 'apolloState', windowKey: '__APOLLO_STATE__' }) }}}
    {{{ renderScripts() }}}
  </body>
</html>

You can run/build in SPA mode with vue-cli-service serve and vue-cli-service build.

With SSR enabled it's still vue-cli-service ssr:serve and vue-cli-service ssr:build.

New

  • Moved Cache-Control maxAge to config (issue: #137) (#138)
  • Added LRU cache options. (#120)
  • Added onError config option
  • Added onRender hook config option (#81)
  • Added option to disable the default static files behaviour (#77)
  • Added clustered config option to run the built in server in cluster mode (#59)
  • Added shouldNotPrefetch and shouldNotPreload options to control assets hints (#59)
  • Allow extending context object with extendContext hook option (#58)
  • Added the ability to disable critical css with criticalCSS option for users who wants to keep css separated (#48)
  • Added copyUrlOnStart option to disable URL copy in clipboard (#41)
  • Return app from ssr serve command. (#143)

Fixed

  • Internal Server Error isn't shown if httpCode is 500, closes #55 (#56)
  • correctly set ssr:serve mode (#60)
  • fix compatibility with router/ directories (#146)
  • keep case sensitivity intact when minifying html template #123 (#124)
  • Use NODE_ENV to determine if webpack should use production build instead of mode (#114)
  • apollo: add fetch polyfill for client (#106)
  • Support publicPath in vue.config.js (#98)
  • await router before mounting the app (#93)
  • don't cache service-worker.js when using pwa plugin (#53)
  • generator: failing linting
  • generator: improved router codemod