Skip to content

Latest commit

 

History

History
1622 lines (721 loc) · 65.1 KB

CHANGELOG.md

File metadata and controls

1622 lines (721 loc) · 65.1 KB

0.3.60 (2022-03-11)

Bug Fixes

  • allow prerender() to be called without any argument (7eca89d)
  • forbid usage of older problematic Vite version (1b04a99)
  • support unicode URLs (443f7c6)

0.3.59 (2022-02-23)

Bug Fixes

  • help eslint resolve modules (fix #270) (14dfe7a)
  • improve bug error message (#268) (a848d9d)
  • improve error message upon wrong escapeInject usage (fix #268) (9331aa8)

0.3.58 (2022-02-20)

Bug Fixes

  • fix windows dynamic import path resolve (c548f3e)

0.3.57 (2022-02-20)

Bug Fixes

  • support ESM module dist/server (4499330)
  • use import() instead of require() (a7886be)

0.3.56 (2022-02-19)

Bug Fixes

  • [bundle-size reduction] remove unused utils from client (cb86e81)
  • [npm package size reduction] remove tests from npm package (3ad6a6b)
  • [npm package size reduction] replace dual ESM+CJS transpiling with (0157912)

0.3.55 (2022-02-18)

Bug Fixes

  • remove TS source files from npm package (fix #265) (d15f134)

0.3.54 (2022-02-17)

Bug Fixes

0.3.53 (2022-02-10)

Bug Fixes

  • add TypeScript types to CLI JavaScript API (b1d90c5)

0.3.52 (2022-02-10)

Features

  • pass globalContext to prerender() hooks (0f52a77)

0.3.51 (2022-02-01)

Bug Fixes

  • fix @brillout/json-s optimizeDeps entry (4e45d08)
  • gracefully handle unexpected URL formats (fix #252) (48ca1b1)
  • improve DX around wrong environement (4f705c4)
  • use more robust Node.js env test (7240263)

0.3.50 (2022-01-28)

Bug Fixes

  • fix 404 link (1006387)
  • improve DX upon serialization failure (d42911c)

Features

  • enable users to trigger error page by throw RenderPageError({ pageContext: /* some additional context passed to _error.page.js */ }) (8731c6e)

0.3.49 (2022-01-26)

Features

  • add baseAssets option; enable CDN deployments (dac4841)

0.3.48 (2022-01-25)

Bug Fixes

  • fix and rename doNotCreateNewHistoryEntry to overwriteLastHistoryEntry (d3a4582)

0.3.47 (2022-01-24)

Features

  • new navigate() option doNotCreateNewHistoryEntry (59460fd)

0.3.46 (2022-01-18)

Features

  • allow render() hook to return a pageContext promise (44ef89d)

0.3.45 (2022-01-17)

Bug Fixes

  • allow user to define rollupOptions.input with a string or string[] (d3f116d)

0.3.44 (2022-01-12)

Features

  • expose SSR errors at pageContext.errorWhileRendering (3a10f11)

0.3.43 (2022-01-04)

Bug Fixes

  • enable improved SPA example (f111fd5)

0.3.42 (2021-12-27)

Bug Fixes

  • attempt to fix the setup.ts bug (0ae3499)

0.3.41 (2021-12-24)

Features

  • add option prerender({ onPagePrender }) (b864664)

0.3.40 (2021-12-23)

Bug Fixes

  • do not use outDir config for plugin dist/ folder (a7b2cc5)
  • improve error message when importBuild.js is missing (fix #235) (4390d7f)
  • replace direct eval with new Function (9432d31)
  • support Cloudflare Pages workers (950b470)

0.3.39 (2021-12-18)

Bug Fixes

  • add debug info for setup.ts:14 bug (edad4cc)

0.3.38 (2021-12-18)

Bug Fixes

  • make noExternal: true work with vite-plugin-ssr (bacba9f)

0.3.37 (2021-12-17)

Bug Fixes

  • HTML tag detection regex (d8c3846)
  • load stream module dynamically only if needed (beb589d)
  • remove Vite's require hook plugin (55270db)

BREAKING CHANGES

  • HTML Streaming changes.
  • httpResponse.bodyNodeStream -> httpResponse.getNodeStream()
  • httpResponse.bodyWebStream -> httpResponse.getWebStream()
  • httpResponse.bodyPipeToNodeWritable() -> httpResponse.pipeToNodeWritable()
  • httpResponse.bodyPipeToWebWritable() -> httpResponse.pipeToWebWritable()

More infos at https://vite-plugin-ssr.com/stream

0.3.36 (2021-12-13)

Bug Fixes

  • add support for relative URLs such as ./relative-path or ?query (b0329d2)
  • deprecate pageContext.urlNormalized in favor of pageContext.urlPathname and pageContext.urlParsed (2b23bf3)

BREAKING CHANGES

  • pageContext.urlNormalized is deprecated. Use pageContext.urlPathname and pageContext.urlParsed instead.

0.3.35 (2021-12-07)

Bug Fixes

  • fix minor Base URL bug

0.3.34 (2021-12-04)

Bug Fixes

  • filesytemRoutingRoot living at root (3f27e5d)

0.3.33 (2021-12-03)

Bug Fixes

0.3.32 (2021-12-03)

Bug Fixes

  • remove duplicated Base URL in dev (b6b660d)
  • support page files at app root (7674ec7)

0.3.31 (2021-11-19)

Bug Fixes

  • don't assume Vite to noramlize root (fix #208) (3b50083)
  • fix client routing deadlock when ensureHydration is set (124c83c)

0.3.30 (2021-11-18)

Bug Fixes

  • make pageContext.pageProps.is404 more resillient (765c5b3)

0.3.29 (2021-11-16)

Bug Fixes

  • add support for url === '/some-base-url' && baseUrl === '/some-base-url/' (bfac53b)
  • Client Router + Base URL regression (fix #205) (cb95ed4)
  • improve argument handling of useClientRouter() (8db8836)
  • regression pageProps.is404 overriden by user provided pageContext (a796168)
  • skip Client Router for links that don't match Base URL (bce64c5)

0.3.28 (2021-11-15)

Bug Fixes

  • add scss/sass/less to inferred types (fix #196) (0a329cf)
  • always use camelCase for CLI options (2ad6027)
  • fix buggy CSS test (8676afa)
  • fix Route Function precendence value assertion (f4d41c7)
  • improve error message when client-side routing to 404 (c036f51)
  • show warning instead of internal error upon relative link URLs (83255e2)

BREAKING CHANGES

  • CLI option $ vite-plugin-ssr prerender --no-extra-dir renamed to $ vite-plugin-ssr prerender --noExtraDir.

0.3.27 (2021-11-10)

Bug Fixes

0.3.26 (2021-11-05)

Bug Fixes

  • do not normalize pageContext.url (22a5311)

0.3.25 (2021-11-05)

Bug Fixes

0.3.24 (2021-11-04)

Bug Fixes

  • [Client Router] add support for links with hash (39ad1fb)
  • add link prefetch handlers once (b8e0d00)

0.3.23 (2021-11-03)

Bug Fixes

  • also render 500 page upon client-side routing (252137b)
  • ensure right content type for .pageContext.json URLs (#191) (56e356f)
  • impl clear message when hooks wrongfully return whole pageContext object (fix #174) (c38eb98)

0.3.22 (2021-11-02)

Bug Fixes

  • Add webp to inferred types (#195)

0.3.21 (2021-11-02)

Bug Fixes

  • provide pageContext.httpResponse.contentType (fix #191) (ee5009d)

0.3.20 (2021-10-30)

Bug Fixes

0.3.19 (2021-10-27)

Bug Fixes

  • improve CSP support (#181)

0.3.18 (2021-10-26)

Bug Fixes

  • ensure filesystem routing is skipped when there is a page route file (95eff57)
  • improve overall precende algorithm (4f84f4e)

0.3.17 (2021-10-25)

Bug Fixes

  • improve route string precedence (74e6abb)

0.3.16 (2021-10-25)

Bug Fixes

  • refactor route precedence algorithm (8ce369b)

BREAKING CHANGES

0.3.15 (2021-10-24)

Bug Fixes

  • reduce priority of catch-all routes (3b11956)

0.3.14 (2021-10-24)

Bug Fixes

  • avoid duplicate error logs (63eb40f)
  • make catch-all route lower prio (fix #178) (235e0dc)

Features

  • make outDir configurable instead of always beeing dist/ (#177)

BREAKING CHANGES

  • Route String priority algorithm changed. AFAICT there aren't any breaking change, but no guarantee here.

0.3.13 (2021-10-21)

Features

0.3.12 (2021-10-17)

Bug Fixes

0.3.11 (2021-10-16)

Features

  • support multiple onBeforeRender() hooks in .page.js and .page.server.js (#95, #153)

Bug Fixes

  • do not optimizeDeps client code deps (#168)
  • update path-to-regexp (f997192)

BREAKING CHANGES

0.3.10 (2021-10-09)

Bug Fixes

  • prepare Vite breaking change (8312b5d)

0.3.9 (2021-10-08)

Bug Fixes

  • add option useClientRouter({ ensureHydration: boolean }) to mitigate "Hydration Mismatch" errors for Vue users" (c5891cd)
  • fix tolerate readable streams with missing read() handler (#138) (e33eea4)
  • stop make superfluous .pageContext.json requests when there are no onBeforeRender() defined on the server-side (#95) (6a16049)
  • tolerate readable streams with missing read() handler (#138) (a214190)

0.3.8 (2021-10-07)

Bug Fixes

  • add option useClientRouter({ ensureHydration: boolean }) to mitigate "Hydration Mismatch" errors for Vue users" (c5891cd)
  • stop make superfluous .pageContext.json requests when there are no onBeforeRender() defined on the server-side (#95) (6a16049)
  • tolerate readable streams with missing read() handler (#138) (a214190)

0.3.7 (2021-10-05)

Bug Fixes

  • also add @brillout/json-s to optimizeDeps (ed255d1)

0.3.6 (2021-10-05)

Bug Fixes

  • tell Vite what to pre-bundle also for vite-plugin-ssr/client/router (#156) (64f7444)

0.3.5 (2021-10-05)

Bug Fixes

  • circumvent Vite bug that occurs when HTML has no <head> (e282837)
  • tell Vite what to pre-bundle (fix #156) (59dfb4c)

0.3.4 (2021-10-05)

Bug Fixes

  • make sure renderPage() never throws an error, gracefully handle errors instead (ec37859)

0.3.3 (2021-09-29)

Features

  • HTML streaming support (#138)

0.3.2 (2021-09-22)

Bug Fixes

  • correctly handle base URL that contains a URL origin (fix #149) (41fb77c)
  • filesystem routing: also map src/ directories to empty string (c629cbe)

Features

  • pageContext.httpResponse.bodyWebStream, pageContext.httpResponse.bodyNodeStream, pageContext.httpResponse.getBody() (c2e1ce2)

0.3.1 (2021-09-14)

Bug Fixes

0.3.0 (2021-09-14)

Bug Fixes

  • dx: forbid user to inject assets twice instead of silently failing (6d4166e)
  • support latest @types/node version (3078ac5)
  • ts: use all strict flags in order to accommodate for users with strict TS settings (#145) (fd5bae5)

Features

  • implement domain-drive file structure (closes #125) (fb368ff)
  • allow render() hook to modify pageContext (e.g. boilerplate-react/renderer/_default.page.server.jsx)
  • onBeforeRoute() out of beta
  • onBeforePrerender() out of beta
  • vite-plugin-ssr can now automatically inject assets to HTML in more situations (paving the way for built-in HTML streaming support)

BREAKING CHANGES

  • dangerouslySkipEscape is now a standalone import.

      // _default.page.server.js
    
    - import { html } from "vite-plugin-ssr"
    + import { html, dangerouslySkipEscape } from "vite-plugin-ssr"
    
      export function render() {
        return html`<!DOCTYPE html>
          <html>
            <body>
    -         <div id="page-view">${html.dangerouslySkipEscape(pageHtml)}</div>
    +         <div id="page-view">${dangerouslySkipEscape(pageHtml)}</div>
            </body>
          </html>`
      }
  • html template tag renamed to escapeInject.

      // _default.page.server.js
    
    - import { html, dangerouslySkipEscape } from "vite-plugin-ssr"
    + import { escapeInject, dangerouslySkipEscape } from "vite-plugin-ssr"
    
      export function render() {
    -   return html`<!DOCTYPE html>
    +   return escapeInject`<!DOCTYPE html>
          <html>
            <body>
              <div id="page-view">${dangerouslySkipEscape(pageHtml)}</div>
            </body>
          </html>`
      }
  • createPageRender() renamed createPageRenderer().

      // server.js
    
    - const renderPage = createPageRender(/*...*/)
    + const renderPage = createPageRenderer(/*...*/)
  • renderPage() changes:

      // server.js
    
      const renderPage = createPageRenderer(/*...*/)
      app.get('*', async (req, res, next) => {
        const url = req.originalUrl
    -   const pageContext = { url }
    -   const result = await renderPage(pageContext)
    -   if (result.nothingRendered) return next()
    -   res.status(result.statusCode).send(result.renderResult)
    +   const pageContextInit = { url }
    +   const pageContext = await renderPage(pageContextInit)
    +   if (!pageContext.httpResponse) return next()
    +   res.status(pageContext.httpResponse.statusCode).send(pageContext.httpResponse.body)
      })
  • Hook addPageContext() deprecated and replaced with onBeforeRender().

      // *.page.server.js
    
    - export function addPageContext(pageContext) {
    + export function onBeforeRender(pageContext) {
        const pageProps = /*...*/
    -   return { pageProps }
    +   return {
    +     pageContext: {
    +       pageProps
    +     }
    +   }
      }
  • _onBeforeRoute() and _onBeforePrerender() are out of beta: rename them to onBeforeRoute() and onBeforePrerender().

  • _injectAssets() is now a standalone import.

      // _default.page.server.js
    
    - import { html } from "vite-plugin-ssr"
    + import { _injectAssets } from "vite-plugin-ssr"
    
      export function render() {
    -   html._injectAssets(/*...*/)
    +   _injectAssets(/*...*/)
      }

0.2.13 (2021-09-03)

Bug Fixes

  • ts: fix typings for HTML Fragments (392268a)

0.2.12 (2021-09-01)

Bug Fixes

  • do not override page's render hook (0f51330)

Features

  • [beta feature] allow user to define _onBeforeRoute() hook (#136, fix #140) (91ed460)
  • allow _onBeforeRoute() to modify pageContext.url (bad2405)
  • allow missing .page.js when .page.client.js and .page.server.js is defined (37f6f6b)
  • [beta feature] allow user to define _onBeforePrerender() hook (fix #136) (9b6a135)
  • dx: improve no route matching warning (586e1c4)

0.2.11 (2021-08-22)

Bug Fixes

  • allow parallel option to be passed via cli (9a94bc9)

0.2.10 (2021-08-22)

Bug Fixes

  • pre-rendering: allow user to control concurrency (fix #134, fix (c7f9454)
  • ts: fix conflicting ViteDevServer type definitions (8d3aef3)
  • ts: make getPage() generic, e.g. getPage<SomeCustomPageContext>() (f56104d)

0.2.9 (2021-08-15)

Bug Fixes

  • allow pageContext to be Vue reactive (65ac828)
  • dx: improve pageContext not available in browser wrong usage message (0563c20)
  • help TS resolve plugin until TS supports package.json#exports (414ce14)
  • skip symbols and toJSON in pageContext proxy (361bca2)
  • ts: return plugin as any to avoid Plugin type mismatches when there are multiple Vite versions installed (34e9b6a)

0.2.8 (2021-08-12)

DX

  • dx: improve error message when user forgot to run $ vite build for production.

0.2.7 (2021-08-10)

Bug Fixes

  • make server-side test work again for CF (fix #130) (fe01932)
  • properly remove built-in props from error message (6e23c10)
  • resolve --root arg (6a51f2a)

0.2.6 (2021-08-09)

Bug Fixes

  • use utils/assert instead of assert of console module (#129) (8b4e39c)

0.2.5 (2021-08-06)

DX

  • dx: improve error message when pageContext is not serializable #127 (fix #128)

0.2.4 (2021-08-03)

Bug Fixes

  • don't overwrite but supplement rollupOptions.input (f3268a8)

Features

  • impl .page.server.js#doNotPrerender to enable pre-rendering skipping (bfb2dd1)

0.2.3 (2021-07-21)

Bug Fixes

  • don't return null upon several matching _default page files (fix #120) (801b92f)

0.2.2 (2021-07-20)

Bug Fixes

  • add support for server written in ESM (fix #118) (56e3885)

0.2.1 (2021-07-19)

Bug Fixes

0.2.0 (2021-07-16)

  • improve dist/server/importBuild.js ergonomics (cad8683)

BREAKING CHANGES

  • dist/server/importer.js has been renamed to dist/server/importBuild.js.

0.1.5 (2021-07-11)

Bug Fixes

  • error when route string is missing a leading slash instead of silently failing (21052c6)
  • properly handle URL suffix .pageContext.json for URL / (84b3e76)

0.1.4 (2021-07-07)

Features

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

0.1.3 (2021-07-07)

Bug Fixes

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

0.1.2 (2021-06-17)

Features

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

0.1.1 (2021-06-09)

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 occurences in your source code of addContextProps to addPageContext, and all occurences 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 scroll restore for first page load (b6f701b)

Features

  • allow Route Functions to return a boolean and make returning match optional (963e488)
  • make contextProps.urlParsed available to user (97aa908)

0.1.0-beta.34 (2021-04-21)

Bug Fixes

  • simplify navigationState and avoid unnecessary contextProps fetching when navigating to /# (#43) (9e2196b)
  • use path.posix.relative instead of path.relative (5eadbb1)
  • version number in assertion messages (47a99a6)

Features

  • make contextProps.urlFull and contextProps.urlPathname available everywhere (fix #42, fix #42) (b3f46fc)

BREAKING CHANGES

  • contextProps.url and contextProps.urlNormalized are deprecated: use contextProps.urlFull and contextProps.urlPathname instead.

0.1.0-beta.33 (2021-04-17)

Bug Fixes

  • retrieve context props for 404 page, and expect missing context props for 404 page if no _error.page.js is defined (fix #41) (55cd596)

0.1.0-beta.32 (2021-04-16)

Features

BREAKING CHANGES

  • pageProps and setPageProps() are deprecated. Define your page props on contextProps.pageProps by returning pageProps in addContextProps(), and then export const passToClient = ['pageProps'] in .page.server.js to tell vite-plugin-ssr to serialize and pass contextProps.pageProps to the browser. In the browser contextProps is now available at const { Page, contextProps } = await getPage() and useClientRouter({ render({ Page, contextProps, isHydration }) }).

0.1.0-beta.31 (2021-04-15)

Bug Fixes

  • remove test files from boilerplates (c255dbb)
  • use parseUrl() instead of new URL() (fix #28) (447d095)

0.1.0-beta.30 (2021-04-10)

Bug Fixes

  • prevent dynamic dependency paths from mistakenly being statically analysed (a1eca47)

Features

  • accept any valid URL to be passed to renderPage() (930865e)
  • add contextProps.routeParams (512a253)
  • add contextProps.urlNormalized (9c932b0)

0.1.0-beta.29 (2021-04-10)

Bug Fixes

0.1.0-beta.28 (2021-04-10)

Bug Fixes

  • cli: process exit 1 on unhandled promise rejections (fix #33) (6ab3b49)
  • [cloudflare workers] do not import plugin code in prod (#1) (a6af9e7)
  • change url right before rendering new page (97530f0)
  • do not assume asset path to start with assets/ (fix #32) (9791c41)
  • improve error handling for CF workers (70a89e0)

Features

  • [cloudflare workers] generate importer.js (#1) (dfa4e76)
  • cli: add option to set root (4f1087a)
  • [cloudflare workers] allow user to manually set Vite Manifests (#1) (75aa55e)
  • [cloudflare workers] make loading vite entry user file loader self sufficient for build (#1) (0693184)
  • [cloudflare workers] remove client-side code in SSR bundles (#1) (557fabc)

BREAKING CHANGES

  • import ssr from 'vite-plugin-ssr' now throws an error; use import ssr from 'vite-plugin-ssr/plugin' instead.

0.1.0-beta.27 (2021-04-03)

Bug Fixes

Features

  • auto-detect whether useClientRouter() is used and pass that info to the pre-render + pass Vite's base value to the pre-render (698f060)
  • support base url for prod server (de8c0e0)

0.1.0-beta.26 (2021-03-30)

Bug Fixes

  • CJS default plugin export (09c3ee4)

0.1.0-beta.25 (2021-03-30)

Bug Fixes

0.1.0-beta.24 (2021-03-30)

Bug Fixes

Features

BREAKING CHANGES

  • This release only works with @vite@2.1.4; make sure to pin your vite dependency to 2.1.4 in your package.json.

0.1.0-beta.23 (2021-03-28)

Bug Fixes

  • add CJS default export for vite-plugin-ssr/plugin (40216d2)

0.1.0-beta.22 (2021-03-28)

Bug Fixes

  • only intercept regular left clicks on regular links (405a27f)
  • save & restore scroll position upon client-side routing (72815c7)

improve

  • don't load plugin code in production (95e7e0f)

BREAKING CHANGES

  • It's now recommended to do import ssr from 'vite-plugin-ssr/plugin'; instead of import ssr from 'vite-plugin-ssr';. A warning will be shown otherwise.

0.1.0-beta.21 (2021-03-26)

Bug Fixes

  • Filesystem Routing bug when common prefix ends in filename (06ccfaa)
  • fix mapping of pageId and page files (fix #18) (45436f5)
  • use some-path/index.html instead of some-path.html (fix #19) (7281ffe)

Features

  • expose CLI as JavaScript API (e16ec91)

0.1.0-beta.20 (2021-03-26)

Bug Fixes

Features

  • update peer dependency on vite 2.1.2->2.1.3 (6778f09)

BREAKING CHANGES

  • this release works only with vite@2.1.3 so make sure to pin your vite dependency to 2.1.3

0.1.0-beta.19 (2021-03-25)

Features

  • add --skip-git flag to boilerplates (18e1616)
  • add support for base url (fix #16) (b4a4f2f)

0.1.0-beta.18 (2021-03-24)

Bug Fixes

  • when injecting HTML: also recognize tags that have attributes (651428a)

Features

0.1.0-beta.17 (2021-03-19)

Bug Fixes

  • remove zero-js problematic example (69d662d)

Features

0.1.0-beta.16 (2021-03-18)

Bug Fixes

  • auto apply @brillout/vite-fix-2390 (f847a32), closes #5

0.1.0-beta.15 (2021-03-17)

Bug Fixes

  • support building in ts cjs projects (be5c7dc), closes #11

0.1.0-beta.14 (2021-03-17)

Bug Fixes

  • improve thenable check (62fca8e)
  • remove need for AntiFlicker by preloading styles in dev (debb9bd), closes #2

Reverts

0.1.0-beta.13 (2021-03-14)

Bug Fixes

  • do not assertUsage viteDevServer in production (d7f69c5)

0.1.0-beta.12 (2021-03-12)

Features

  • allow non-page .server file extensions (10a14d1), closes #3

0.1.0-beta.11 (2021-03-09)

Bug Fixes

  • skip /favicon.ico requests (f528784)

chore

  • rename createRender() to createPageRender() (f62dc8e)

Features

  • improve error handling (4a945bf)
  • improve route functions (9af7f7b)
  • improve usage error messages (cc0d678)

BREAKING CHANGES

  • server integration point createRender() renamed to createPageRender().
  • render() function (const render = createRender(/*...*/)) now returns an object { nothingRendered, renderResult, statusCode }.
  • _404.page.js and _500.page.js deprecated and replaced with _error.page.js.

0.1.0-beta.10 (2021-03-05)

Bug Fixes

  • convert windows path to posix for micromatch (cc9c405), closes #4
  • don't try to inject dynamic import polyfill (fdffd37)
  • boilerplates: remove duplicated file (4421aa6)

Features

  • allow render hook to return an object instead of HTML (a649eaf)
  • support _500.page.js and improve error handling (d492b9c)
  • support html tag composition (9a57006)

0.1.0-beta.9 (2021-03-01)

Bug Fixes

  • Fix released build

0.1.0-beta.8 (2021-03-01)

Bug Fixes

  • re-export default (cd43e6e)
  • use in operator only on objects (819dfe1)

Features

  • remove html.sanitize and make sanitized automatic (95d145c)

BREAKING CHANGES

  • Removed html.sanitize(); simply directly insert the string and vite-plugin-ssr will automatically sanitize it

0.1.0-beta.7 (2021-02-28)

Features

  • Pass Page to addContextProps. (2512ee3)

0.1.0-beta.6 (2021-02-22)

Initial public release