vitedge

Edge-side rendering and fullstack Vite framework

MIT License

Downloads
205
Stars
730
Committers
11
vitedge - 0.19.1 Latest Release

Published by frandiox about 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/frandiox/vitedge/compare/v0.19.0...v0.19.1

vitedge - 0.19.0

Published by frandiox over 2 years ago

What's Changed

  • Support Vite 2.8+
  • Fix illegal invocation in CFW
  • Update to React Router v6

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>

Full Changelog: https://github.com/frandiox/vitedge/compare/v0.18.2...v0.19.0

vitedge - 0.18.2

Published by frandiox over 2 years ago

What's Changed

Full Changelog: https://github.com/frandiox/vitedge/compare/v0.18.1...v0.18.2

vitedge - 0.18.1

Published by frandiox almost 3 years ago

vitedge - 0.18.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 React props routing when using base parameter.
  • Fix hydration in Vue apps in https://github.com/frandiox/vite-ssr/pull/129
  • Fix backslash escaping in serialized state 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.

Full Changelog: https://github.com/frandiox/vitedge/compare/v0.17.5...v0.18.0

vitedge - 0.17.5

Published by frandiox almost 3 years ago

  • Support Vite >= 2.7. Related #71
vitedge - 0.17.4

Published by frandiox almost 3 years ago

  • Support Node >= 16.2. Related #74
vitedge - 0.17.3

Published by frandiox almost 3 years ago

What's Changed

  • Fix: Avoid 404 for pages without props handler (fix #66) by @m3hari in https://github.com/frandiox/vitedge/pull/67
  • Feat: Add excludeSsrComponents option in plugin that removes components from the SSR bundle. Components are mocked during SSR and will be hydrated in browser. This is useful for components that are not isomorphic (e.g. access window or document) and to reduce the bundle size.
  • Feat: Add skipSSR option to handleEvent. With this, the HTML response will only include the minimum index.html with the corresponding dependencies (SPA behavior).

New Contributors

Full Changelog: https://github.com/frandiox/vitedge/compare/v0.17.2...v0.17.3

vitedge - 0.17.2

Published by frandiox about 3 years ago

  • Expose Vite SSR plugin options in Vitedge plugin.

Full Changelog: https://github.com/frandiox/vitedge/compare/v0.17.1...v0.17.2

vitedge - 0.17.1

Published by frandiox about 3 years ago

  • Added usePageProps hook to access the current page props returned by the props handler.
  • Fix first page state when running SPA-only mode.
  • Fix minor state serialization with already escaped characters (e.g. \n).
  • Support Vite 2.6.x. For better DX in development, add the following to your entry point (main.js):
if (import.meta.hot) {
  globalThis.__hot = import.meta.hot
}

Full Changelog: https://github.com/frandiox/vitedge/compare/v0.17.0...v0.17.1

vitedge - 0.17.0

Published by frandiox about 3 years ago

What's Changed

  • Leaner state serialization to JSON.
  • Pass cookie headers automatically to props handlers.
  • Expose core library. This enables SSR with Vanilla JS or bring-your-own-framework easily.
  • Support the new @vite/plugin-react.
  • Vite 2.5.x is now required (2.6.x will be supported in following releases).

Full Changelog: https://github.com/frandiox/vitedge/compare/v0.16.4...v0.17.0

vitedge - 0.16.4

Published by frandiox about 3 years ago

vitedge - 0.16.3

Published by frandiox about 3 years ago

  • fix: Bump peer dependency to avoid issues with npm@7
  • fix: Do not use static imports in CLI to support yarn berry
vitedge - 0.16.2

Published by frandiox about 3 years ago

  • feat: Fetch page props and page components in parallel [Vue]
  • fix: Allow running vue-router beforeEach guards before awaiting page props request. #57
  • fix: Correctly pass query parameter to Page Props handlers in Node/prod environments. #58
  • fix: query parameter in API handlers should be a plain object instead of URLSearchParams.
vitedge - 0.16.1

Published by frandiox about 3 years ago

  • fix: Allow props files to be called props/index.js
  • fix: Allow props files to contain brackets: props/[name].js
vitedge - 0.16.0

Published by frandiox about 3 years ago

Features

  • Cloudflare Workers APIs (cache, KV, WS, etc) are now polyfilled during development when miniflare is installed in the project. Note that DO is still not available due to a bug in kv-asset-handler package.
  • [BREAKING] React Style Collectors: New option to extract CSS-in-JS during SSR for React. Vitedge's experimental auto-detection of styled-components and @material-ui/core is now deprecated. Use one of the provided style collectors or make a custom one: docs.
  • Expose createSsrServer to run Vitedge as middleware in custom servers such as Express or Fastify.

Fixes

  • Wrap process.env matches in parenthesis to avoid code such as process.env.hasOwnProperty crash (looking at you Fauna).
  • Functions build options were not correctly passed to Rollup.
vitedge - 0.15.1

Published by frandiox about 3 years ago

  • feat: Accept ESBuild options in plugin
vitedge - 0.15.0

Published by frandiox about 3 years ago

Features

  • 🔥 New preview mode: vitedge preview or vitedge preview --build-watch. This mode runs the app in Miniflare to create a local environment more similar to workers (faster than wrangler dev). Thanks to @mrbbot for all the help!
  • 🎉 Vitedge can now generate the final worker script using ESBuild optionally, which replaces Wrangler's Webpack build.
  • Add support for import.meta.env object in functions directory (similar to process.env, but more consistent with Vite's behavior).
  • Support build watch: vitedge build --watch.

Fixes

  • Undefined waitUntil in API calls during SSR run.
vitedge - 0.14.0

Published by frandiox over 3 years ago

Features

  • API can now be consumed from Page Props handlers using fetch. #37
  • New utility useContext to access SSR Context from any component.

Fixes

  • Wrong default NODE_ENV value in staging.
  • Export ClientOnly component in Vue.
  • Default order of Webpack's mainFields for React.
  • General issues with typings.
vitedge - 0.13.3

Published by frandiox over 3 years ago