Skip to content

Commit

Permalink
chore: rm redundant react-router-dom
Browse files Browse the repository at this point in the history
  • Loading branch information
denchiklut committed Jan 30, 2025
1 parent bb1fd3a commit 34817f2
Show file tree
Hide file tree
Showing 7 changed files with 671 additions and 465 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"react-dom": "19.0.0",
"react-error-boundary": "^5.0.0",
"react-router": "^7.1.1",
"react-router-dom": "^7.1.1",
"reflect-metadata": "^0.2.2",
"tiny-invariant": "^1.3.3",
"universal-cookie-express": "^7.2.2",
Expand Down Expand Up @@ -80,15 +79,15 @@
"@typescript-eslint/parser": "^8.18.2",
"autoprefixer": "^10.4.20",
"babel-loader": "^9.2.1",
"babel-plugin-react-compiler": "^19.0.0-beta-b2e8e9c-20241220",
"babel-plugin-react-compiler": "latest",
"copy-webpack-plugin": "^12.0.2",
"cross-env": "^7.0.3",
"css-loader": "7.1.2",
"cssnano": "^7.0.6",
"eslint": "^9.17.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.3",
"eslint-plugin-react-compiler": "^19.0.0-beta-b2e8e9c-20241220",
"eslint-plugin-react-compiler": "latest",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"globals": "^15.14.0",
"html-loader": "^5.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/@shared/app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type FC, lazy, StrictMode } from 'react'
import { Route, Routes } from 'react-router-dom'
import { Route, Routes } from 'react-router'
import { CookiesProvider } from 'react-cookie'
import { type AppProps, getENV } from 'src/common'
import { Layout } from '@shared/layout'
Expand Down
3 changes: 1 addition & 2 deletions src/client/components/@shared/layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Suspense } from 'react'
import { Link } from 'react-router-dom'
import { Outlet } from 'react-router-dom'
import { Link, Outlet } from 'react-router'
import { ErrorBoundary } from 'react-error-boundary'
import { Fallback } from '@shared/error'
import { Loader } from '@shared/loader'
Expand Down
2 changes: 1 addition & 1 deletion src/client/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BrowserRouter } from 'react-router-dom'
import { BrowserRouter } from 'react-router'
import { bootstrap } from 'client/utils'
import { basename } from 'src/common'
import { App } from '@shared/app'
Expand Down
4 changes: 2 additions & 2 deletions src/client/utils/bootstrap.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { createRoot, hydrateRoot } from 'react-dom/client'
export const bootstrap = (app: ReactNode) => {
const spaContainer = document.getElementById('root') as HTMLElement

if (IS_SPA) createRoot(spaContainer).render(app as any)
else hydrateRoot(document, app as any)
if (IS_SPA) createRoot(spaContainer).render(app)
else hydrateRoot(document, app)
}
2 changes: 1 addition & 1 deletion src/server/middleware/render/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { StaticRouter } from 'react-router-dom'
import { StaticRouter } from 'react-router'
import { renderToPipeableStream } from 'react-dom/server'
import type { NextFunction, Request, Response } from 'express'
import { logger, setEnvVars, basename } from 'src/common'
Expand Down
1,118 changes: 663 additions & 455 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 34817f2

Please sign in to comment.