Skip to content

0.12.0

Choose a tag to compare

@frandiox frandiox released this 30 Jul 15:35
· 128 commits to master since this release
  • 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 })