UNPKG

one

Version:

One is a new React Framework that makes Vite serve both native and web.

14 lines (13 loc) 364 B
import { getURL } from "../getURL"; import { router } from "../router/imperative-api"; const redirect = (path, status) => { if (process.env.VITE_ENVIRONMENT === "client") { router.navigate(path); return; } return Response.redirect(path[0] === "/" ? `${getURL()}${path}` : path, status); }; export { redirect }; //# sourceMappingURL=redirect.js.map