Releases: vikejs/vike
Releases · vikejs/vike
v0.1.4
v0.1.3
v0.1.2
v0.1.1
Features
0.1.0 (2021-06-06)
Nothing changed (0.1.0 is equivalent to 0.1.0-beta.50); vite-plugin-ssr is now out of beta :-).
0.1.0-beta.50 (2021-06-02)
Bug Fixes
0.1.0-beta.49 (2021-06-02)
Bug Fixes
- dual publish CJS + ESM (vitejs/vite#3617, fix #85)
0.1.0-beta.48 (2021-05-30)
Bug Fixes
- export SsrEnv as type (8c8f5ba)
BREAKING CHANGES
- Replace
dangerouslySetHtmlwith
dangerouslySkipEscape. E.g. for linux users:
git ls-files | xargs sed -i "s/dangerouslySetHtml/dangerouslySkipEscape/g"
0.1.0-beta.47 (2021-05-29)
Features
- make
*.page.jsexports available to user aspageContext.pageExports(fix #80)
0.1.0-beta.46 (2021-05-28)
BREAKING CHANGES
- Apply following changes:
// *.page.server.js
export { render }
- function render({ Page, pageContext }) {
+ function render(pageContext) {
+ const { Page } = pageContext
/* ... */
}
export { addPageContext }
- function addPageContext({ Page, pageContext }) {
+ function addPageContext(pageContext) {
+ const { Page } = pageContext
/* ... */
} // *.page.client.js
import { getPage } from "vite-plugin-ssr/client";
- const { Page, pageContext } = await getPage();
+ const pageContext = await getPage();
+ const { Page } = pageContext // *.page.client.js
import { useClientRouter } from 'vite-plugin-ssr/client/router'
useClientRouter({
- render({ Page, pageContext, isHydration }) {
+ render(pageContext) {
+ const { Page, isHydration } = pageContext
/* ... */
},
}) // At your server integration point
const express = require('express')
const { createPageRender } = require('vite-plugin-ssr')
/* ... */
const pageRender = createPageRender(/*...*/)
/* ... */
- pageRender({ url, pageContext })
+ pageContext.url = url
+ pageRender(pageContext)pageContext.urlFullis deprecated; usepageContext.urlNormalized
instead.
0.1.0-beta.45 (2021-05-26)
Bug Fixes
- reload glob imports in dev (#66) (09b54c0)
- Route Functions should return
routeParamsinstead ofcontextProps(fix #63) (e03b918)
Features
- always route on the server-side (fix #73) (ef3eb3c)
- rename
contextPropstopageContext, andaddContextPropstoaddPageContext(fix #58) (aedf9fc), closes #58
BREAKING CHANGES
- Replace all occurrences in your source code of
addContextPropsto
addPageContext, and all occurrences ofcontextPropstopageContext.
There is no need for semantic replacing: you can simply replace
text, for example with a linux terminal:git ls-files | xargs sed -i "s/addContextProps/addPageContext/g"git ls-files | xargs sed -i "s/contextProps/pageContext/g"
- Make your Route Functions return
{ match: true, routeParams: {/*...*/} }instead of
{ match: true, pageContext: {/*...*/} }(or
{ match: true, contextProps: {/*...*/} }if you didn't
renamecontextPropstopageContextyet).
0.1.0-beta.44 (2021-05-20)
Bug Fixes
- Add mime types to preload tags, add common image preload tags (29a3b96)
0.1.0-beta.43 (2021-05-18)
Bug Fixes
- use
visibilitychangeevent instead ofunloadevent (b2cc36e)
Features
- implement
<a keep-scroll-position />andnavigate(url, { keepScrollPosition: true })(#62) (6a8515a)
0.1.0-beta.42 (2021-05-14)
Bug Fixes
0.1.0-beta.41 (2021-05-14)
Bug Fixes
Features
0.1.0-beta.40 (2021-05-05)
Bug Fixes
- add empty .npmignore to ensure dist/ is always published (c241c53)
0.1.0-beta.38 (2021-05-05)
Bug Fixes
0.1.0-beta.37 (2021-05-04)
- make route parameters available only at
contextProps.routeParams(f98f94b)
BREAKING CHANGES
- Route parameters are not available directly at
contextProps
anymore. E.g. usecontextProps.routeParams.movieIdinstead of
contextProps.movieId(for a route string/movie/:movieId).
0.1.0-beta.36 (2021-05-01)
Bug Fixes
- also check windows path for
usesClientRoutertest (b3c1cab) - do not assume .page.js files to always be the root in the manifest (fix #51) (138a3f7)
- fix preload tags paths when building on windows (9c2fd40)