Edge-side rendering and fullstack Vite framework
MIT License
Full Changelog: https://github.com/frandiox/vitedge/compare/v0.19.0...v0.19.1
Published by frandiox over 2 years ago
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
Published by frandiox over 2 years ago
Full Changelog: https://github.com/frandiox/vitedge/compare/v0.18.1...v0.18.2
Published by frandiox almost 3 years ago
import.meta.hot
https://github.com/vitejs/vite/issues/5270
Published by frandiox almost 3 years ago
url
object passed in context is always type URL
(before it was type Location
).base
parameter.base
is provided under some conditions.127.0.0.1
instead of localhost
in macOS to prevent Vite issues.$1
. Related #123pluginOptions.containerId
to customize the container element ID in index.html
.Full Changelog: https://github.com/frandiox/vitedge/compare/v0.17.5...v0.18.0
Published by frandiox almost 3 years ago
Published by frandiox almost 3 years ago
Published by frandiox almost 3 years ago
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.skipSSR
option to handleEvent
. With this, the HTML response will only include the minimum index.html
with the corresponding dependencies (SPA behavior).Full Changelog: https://github.com/frandiox/vitedge/compare/v0.17.2...v0.17.3
Published by frandiox about 3 years ago
Full Changelog: https://github.com/frandiox/vitedge/compare/v0.17.1...v0.17.2
Published by frandiox about 3 years ago
usePageProps
hook to access the current page props returned by the props handler.\n
).if (import.meta.hot) {
globalThis.__hot = import.meta.hot
}
Full Changelog: https://github.com/frandiox/vitedge/compare/v0.17.0...v0.17.1
Published by frandiox about 3 years ago
@vite/plugin-react
.Full Changelog: https://github.com/frandiox/vitedge/compare/v0.16.4...v0.17.0
Published by frandiox about 3 years ago
Published by frandiox about 3 years ago
Published by frandiox about 3 years ago
beforeEach
guards before awaiting page props request. #57query
parameter to Page Props handlers in Node/prod environments. #58query
parameter in API handlers should be a plain object instead of URLSearchParams
.Published by frandiox about 3 years ago
props/index.js
props/[name].js
Published by frandiox about 3 years ago
miniflare
is installed in the project. Note that DO is still not available due to a bug in kv-asset-handler
package.styled-components
and @material-ui/core
is now deprecated. Use one of the provided style collectors or make a custom one: docs.createSsrServer
to run Vitedge as middleware in custom servers such as Express or Fastify.process.env
matches in parenthesis to avoid code such as process.env.hasOwnProperty
crash (looking at you Fauna).Published by frandiox over 3 years ago
Published by frandiox over 3 years ago
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!import.meta.env
object in functions
directory (similar to process.env
, but more consistent with Vite's behavior).vitedge build --watch
.waitUntil
in API calls during SSR run.Published by frandiox over 3 years ago
fetch
. #37useContext
to access SSR Context from any component.NODE_ENV
value in staging.ClientOnly
component in Vue.mainFields
for React.Published by frandiox over 3 years ago
[email protected]