Releases: Akryum/vue-cli-plugin-ssr
Releases · Akryum/vue-cli-plugin-ssr
v0.6.0
Breaking changes
- Now require Node 8+
- Now use a different html file (by default
index.ssr.html
) so spaserve
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
andshouldNotPreload
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
v0.4.0
v0.3.0
Breaking change
ssrMiddleware
is no longer exported by the index file to prevent it from being loaded eagerly. Useimport 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
andwebpack-hot-middleware
Docs
- Basic config doc
v0.2.2
v0.2.0
Breaking change
- There is no longer an HTML template in
src
, the plugin usespublic/index.html
instead. This means all the double or triple curly-braces for SSR template must be move topublic/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
- The Apollo server middleware is now only active in production.
- You no longer need to externalize
vue-cli-plugin-apollo
andvue-apollo
: 8bd2c1c#diff-f7bf2b665273dfa66ffa4ad7c0a52bb9
Fixed
- Apollo support fixes
- classic serve/build commands (
build
andserve
) - Apollo server files not linted after invocation
- some ESlint errors after invocation