🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →

elysia-react-router

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elysia-react-router - npm Package Compare versions

Comparing version

to
0.2.0

@@ -6,1 +6,3 @@ export { reactRouter } from './react-router.js';

import 'react-router';
import './utils-WsggFj7T.js';
import 'node:fs';
import { join } from 'node:path';
import { join as join$1 } from 'node:path/posix';
import { Elysia } from 'elysia';
import { Elysia, file } from 'elysia';
import { createRequestHandler } from 'react-router';
import { u as universalGlob } from './utils-WsggFj7T.js';
import 'node:fs';

@@ -43,8 +45,8 @@ async function reactRouter(options) {

const clientDirectory = join(buildDirectory, "client");
const glob = new Bun.Glob(`${clientDirectory}/**`);
for (const path of glob.scanSync()) {
const glob = universalGlob(`${clientDirectory}/**`);
for (const path of glob) {
elysia.get(
// TODO: find more nice way
join$1(path.substring(clientDirectory.length)).replaceAll("\\", "/"),
() => new Response(Bun.file(path))
() => file(path)
);

@@ -51,0 +53,0 @@ }

import { join } from 'node:path';
import { join as join$1 } from 'node:path/posix';
import { createRequestHandler } from '@remix-run/node';
import { Elysia } from 'elysia';
import { Elysia, file } from 'elysia';
import { u as universalGlob } from './utils-WsggFj7T.js';
import 'node:fs';

@@ -43,8 +45,8 @@ async function remix(options) {

const clientDirectory = join(buildDirectory, "client");
const glob = new Bun.Glob(`${clientDirectory}/**`);
for (const path of glob.scanSync()) {
const glob = universalGlob(`${clientDirectory}/**`);
for (const path of glob) {
elysia.get(
// TODO: find more nice way
join$1(path.substring(clientDirectory.length)).replaceAll("\\", "/"),
() => new Response(Bun.file(path))
() => file(path)
);

@@ -51,0 +53,0 @@ }

{
"name": "elysia-react-router",
"version": "0.1.0",
"version": "0.2.0",
"module": "./dist/index.js",

@@ -13,3 +13,3 @@ "types": "./dist/index.d.ts",

"type": "git",
"url": "git+https://github.com/kravetsone/elysia-react-router"
"url": "git+https://github.com/kravetsone/elysia-react-router.git"
},

@@ -41,2 +41,3 @@ "homepage": "https://github.com/kravetsone/elysia-react-router",

"@types/bun": "latest",
"@types/node": "^22.14.0",
"elysia-connect-middleware": "^0.0.3",

@@ -43,0 +44,0 @@ "pkgroll": "^2.5.1",

# Elysia React Router and Remix
Use [React Router v7](https://reactrouter.com/home) or [Remix](https://remix.run/) with [Elysia](https://elysiajs.com/) with `HMR` support! Closes a long-standing elysia plugin request https://github.com/elysiajs/elysia/issues/12
Use [React Router v7](https://reactrouter.com/home) or [Remix](https://remix.run/) with [Elysia](https://elysiajs.com/) with `HMR` support and `Node` adapter support! Closes a long-standing elysia plugin request https://github.com/elysiajs/elysia/issues/12

@@ -5,0 +5,0 @@ > [!IMPORTANT]