vite-ssr

Use Vite for server side rendering in Node

MIT License

Downloads
3.9K
Stars
827
Committers
21
vite-ssr - 0.17.2 Latest Release

Published by frandiox 2 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/frandiox/vite-ssr/compare/v0.17.1...v0.17.2

vite-ssr - 0.17.1

Published by frandiox over 1 year ago

What's Changed

Full Changelog: https://github.com/frandiox/vite-ssr/compare/v0.17.0...v0.17.1

vite-ssr - 0.17.0

Published by frandiox over 1 year ago

What's Changed

We've skipped Vite 3 so please check migration guides from v2 to v3 and then to v4.

New Contributors

Full Changelog: https://github.com/frandiox/vite-ssr/compare/v0.16.0...v0.17.0

vite-ssr - 0.16.0

Published by frandiox over 2 years ago

What's Changed

Upgrade guide for React Router v6

package.json

-"react-router-config": "^5.0.2",
-"react-router-dom": "^5.2.0"
+"react-router-dom": "^6.2.2"

App.jsx

-import { Link, Route, Switch } from 'react-router-dom'
+import { Link, Route, Routes } from 'react-router-dom'
-      <Switch>
+      <Routes>
        {router.routes.map((route) => {
          return (
-            <Route key={route.path} path={route.path}>
-              <route.component route={route} baseUrl={baseUrl} />
-            </Route>
+            <Route
+              key={route.path}
+              path={route.path}
+              element={<route.component route={route} baseUrl={baseUrl} />}
+            />
          )
        })}
-      </Switch>
+      </Routes>

New Contributors

Full Changelog: https://github.com/frandiox/vite-ssr/compare/v0.15.0...v0.16.0

vite-ssr - 0.15.0

Published by frandiox almost 3 years ago

What's Changed

  • Breaking: the url object passed in context is always type URL (before it was type Location).
  • Fix hydration in Vue apps by @CyberAP in https://github.com/frandiox/vite-ssr/pull/129
  • Fix backslash escaping in serialized state by @dchenk in https://github.com/frandiox/vite-ssr/pull/130
  • Fix routing when base is provided under some conditions.
  • Dev server defaults to 127.0.0.1 instead of localhost in macOS to prevent Vite issues.
  • Fix rendered HTML when state or body contains $1. Related #123
  • Add pluginOptions.containerId to customize the container element ID in index.html.
  • Require latest Vite and Vue versions as peer dependencies.

New Contributors

Full Changelog: https://github.com/frandiox/vite-ssr/compare/v0.14.3...v0.15.0

vite-ssr - 0.14.3

Published by frandiox almost 3 years ago

What's Changed

  • fix: Split state logic in two files to avoid crashing in Safari during development. Closes #118 by @salqueng in https://github.com/frandiox/vite-ssr/pull/119
  • feat: New excludeSsrComponents option in the plugin to remove components from the SSR build. Components are mocked and will render nothing in SSR but will be hydrated later in the browser. This allows having a smaller server build for constraint environments like Cloudflare Workers.

New Contributors

Full Changelog: https://github.com/frandiox/vite-ssr/compare/v0.14.2...v0.14.3

vite-ssr - 0.14.2

Published by frandiox about 3 years ago

  • Fix state serialization containing already escaped characters (\n, etc).

Full Changelog: https://github.com/frandiox/vite-ssr/compare/v0.14.1...v0.14.2

vite-ssr - 0.14.1

Published by frandiox about 3 years ago

vite-ssr - 0.14.0

Published by frandiox about 3 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/frandiox/vite-ssr/compare/v0.13.2...v0.14.0

vite-ssr - 0.13.2

Published by frandiox about 3 years ago

  • fix: Wrong dependencies #102
vite-ssr - 0.13.1

Published by frandiox about 3 years ago

  • feat: Show Vite error overlay in development on SSR errors.
vite-ssr - 0.13.0

Published by frandiox about 3 years ago

  • feat: Switch to TS interfaces instead of types to allow overriding from user land.
  • feat: Support custom input paths for index.html #88
  • feat: Accept build.serverOptions and build.clientOptions in the plugin.
  • fix: Allow attributes in app wrapper #82
vite-ssr - 0.12.1

Published by frandiox about 3 years ago

  • feat: Add keepIndexHtml build option.
vite-ssr - 0.12.0

Published by frandiox about 3 years ago

  • feat: Export createSsrServer from vite-ssr/dev to support running dev server as middleware.
  • BREAKING (React): The experimental support for styled-components and @material-ui/core has been refactored into a more extendable solution called Style Collector plugins. Instead of detecting CSS-in-JS automatically like before, now you must provide a styleCollector option. Vite SSR exports style collectors for the 2 existing integrations, styled-components and material-ui-core-v4, plus the newly added emotion. See style collector examples to implement your own. Example using one of the 3 provided collectors:
import viteSSR from 'vite-ssr/react'
import styleCollector from 'vite-ssr/react/style-collectors/styled-components'

export default viteSSR(App, { routes, styleCollector })
vite-ssr - 0.11.3

Published by frandiox about 3 years ago

  • Fix: Possible undefined variable when using getRenderContext.
vite-ssr - 0.11.2

Published by frandiox over 3 years ago

  • Fix: Export Context type.
  • Fix: Await for build in watch mode when using JS API.
vite-ssr - 0.11.1

Published by frandiox over 3 years ago

  • Fix: Support Vite's build watch.
  • Fix: Do not copy files from public to dist/server.
vite-ssr - 0.11.0

Published by frandiox over 3 years ago

  • Feat: useContext utility to access the SSR context (initialState, etc) from anywhere.
  • Feat: redirect and writeResponse utilities to change response headers and status. #55
  • Fix: Vite config properties such as outDir were ignored. #53 #62
  • Fix: Types for request and response object. #54
  • Fix: Compatibility with vite-plugin-legacy. #63 #58
vite-ssr - 0.10.6

Published by frandiox over 3 years ago

  • Fix: Crash with custom aliases that contain 'vite-ssr' in the replacement. #47
  • Feat: Allow importing from vite-ssr/vue and vite-ssr/react to improve typings.
vite-ssr - 0.10.5

Published by frandiox over 3 years ago

  • Mark vite-ssr as noExternal in Vite to make it work when installed as devDependencies. Context.

Vue

  • Add options.routerOptions. #42