Skip to content

Releases: vikejs/vike

v0.1.4

19 Mar 20:40

Choose a tag to compare

Features

  • add option $ vite-plugin-ssr prerender --noExtraDir (c88e030)
  • provide TypeScript types for pageContext (fix #110) (ceb6ebd)

v0.1.3

19 Mar 20:40

Choose a tag to compare

Bug Fixes

  • don't lower case when matching URLs (333583f)
  • improve strategy to hunt down Vite cache bug (#108) (085207a)

v0.1.2

19 Mar 20:40

Choose a tag to compare

Features

  • also expose pageContext.pageExports on the client-side (83801ff)
  • support async route functions (fix #97) (0aca411)

v0.1.1

19 Mar 20:40

Choose a tag to compare

Features

  • enable Jest/Babel component unit testing (fix #91) (cb3417d)

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

  • define ESM build in tsconfig.ts instead of CLI (vitejs/vite#3617, fix #85) (4fdbf91)

0.1.0-beta.49 (2021-06-02)

Bug Fixes

0.1.0-beta.48 (2021-05-30)

  • rename dangerouslySetHtml to dangerouslySkipEscape (fix #84) (b14bd17), closes #84

Bug Fixes

BREAKING CHANGES

  • Replace dangerouslySetHtml with
    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.js exports available to user as pageContext.pageExports (fix #80)

0.1.0-beta.46 (2021-05-28)

  • define everything on pageContext (fix #76) (15d68f8), closes #76

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.urlFull is deprecated; use pageContext.urlNormalized
    instead.

0.1.0-beta.45 (2021-05-26)

Bug Fixes

  • reload glob imports in dev (#66) (09b54c0)
  • Route Functions should return routeParams instead of contextProps (fix #63) (e03b918)

Features

  • always route on the server-side (fix #73) (ef3eb3c)
  • rename contextProps to pageContext, and addContextProps to addPageContext (fix #58) (aedf9fc), closes #58

BREAKING CHANGES

  • Replace all occurrences in your source code of addContextProps to
    addPageContext, and all occurrences of contextProps to pageContext.
    There is no need for semantic replacing: you can simply replace
    text, for example with a linux terminal:
    1. git ls-files | xargs sed -i "s/addContextProps/addPageContext/g"
    2. 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
    rename contextProps to pageContext yet).

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 visibilitychange event instead of unload event (b2cc36e)

Features

  • implement <a keep-scroll-position /> and navigate(url, { keepScrollPosition: true }) (#62) (6a8515a)

0.1.0-beta.42 (2021-05-14)

Bug Fixes

  • write pre-render files sequentially (fix #59) (2339746)

0.1.0-beta.41 (2021-05-14)

Bug Fixes

  • on static hosts, fallback to Server Routing for 404 pages (#57) (56e0d0a)

Features

  • also generate dist/client/404.html when pre-rendering (fix #57) (d6072f2)

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

  • make sure Node.js doesn't try to use browser entry points (fix #55) (4e9c14b)

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. use contextProps.routeParams.movieId instead of
    contextProps.movieId (for a route string /movie/:movieId).

0.1.0-beta.36 (2021-05-01)

Bug Fixes

  • also check windows path for usesClientRouter test (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)

0.1.0-beta.35 (2021-04-26)

Bug Fixes

  • vite-fix-2390 is not required anymore (& bump Vite dependency) (36fade0)
  • do not reload page when user only changes the URL hash (dbb6f9a)
  • do not use new URL for extracting URL search and URL hash (fix #47) (4f3d737)
  • throttle scroll event listener (fix #46) (c58d1ff)
  • use browser ...
Read more