Skip to content

Releases: Akryum/vue-cli-plugin-ssr

v0.6.0

20 Oct 23:06
Compare
Choose a tag to compare
v0.6.0 Pre-release
Pre-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

v0.5.0

04 Feb 19:51
Compare
Choose a tag to compare
v0.5.0 Pre-release
Pre-release

Breaking change

  • Now requires Vue 2.6 in peerDependencies

New

  • The generator now uses new Vue 2.6 SSR APIs like context.rendered

v0.4.0

24 Dec 15:30
Compare
Choose a tag to compare
v0.4.0 Pre-release
Pre-release

New

  • Wait for initial compile (#39), fixes #38
  • Add directive SSR fallback (#30)
  • Added ability to return custom html if Internal Server Error has happend. (#19)
  • use webpack-chain in webpack config (#16), closes #15
  • use chainWebpack

Fixed

  • build: do not break if the rule don't have options (#20)

v0.3.0

14 Oct 15:22
Compare
Choose a tag to compare
v0.3.0 Pre-release
Pre-release

Breaking change

  • ssrMiddleware is no longer exported by the index file to prevent it from being loaded eagerly. Use import ssrMiddleware from '@akryum/vue-cli-plugin-ssr/lib/app instead.

New

  • Server: Add express middlewares inside config (#23)
  • refactor: middlewares => extendServer
  • custom host

Fixed

  • eslint errors
  • lazy-load deps

Misc

  • updated express, webpack-dev-middleware and webpack-hot-middleware

Docs

  • Basic config doc

v0.2.2

31 Aug 12:42
Compare
Choose a tag to compare
v0.2.2 Pre-release
Pre-release

Improved

  • automatic critical CSS in production

Fixed

  • build: don't remove comments in HTML template, closes #13
  • ui: task start
  • index.html filter not working, closes #12
  • default node external whitelist
  • mini-css-extract-plugin error on server
  • build: progress bars
  • build: better error output

v0.2.0

30 Aug 13:37
Compare
Choose a tag to compare
v0.2.0 Pre-release
Pre-release

Breaking change

  • There is no longer an HTML template in src, the plugin uses public/index.html instead. This means all the double or triple curly-braces for SSR template must be move to public/index.html. This change allows the plugin to take advantage of all the injected stuff to the HTML page from other plugins (like the PWA plugin).

New

  • UI: plugin logo
  • UI: basic tasks

Improved

Fixed

  • Apollo support fixes
  • classic serve/build commands (build and serve)
  • Apollo server files not linted after invocation
  • some ESlint errors after invocation