feat(frontend): upgrade React 17→18 + react-scripts 4→5 (Phase 2)

- Update package.json: react/react-dom ^17→^18.3.1, react-scripts 4→5.0.1
- Migrate to React 18 Root API in src/index.js (createRoot)
- Add --legacy-peer-deps to Dockerfile for MUI v4 compatibility
- Regenerate package-lock.json with legacy peer deps flag

 Tested: Production build 253.28 KB gzip, containers running
 Manual test: Upload, Moderation, Public View, Slideshow - all working

Phase 2 complete: Frontend on React 18 with concurrent rendering.
This commit is contained in:
Matthias Lotz 2025-10-28 21:30:14 +01:00
parent acdb2fa6cd
commit 93534587d2
4 changed files with 11881 additions and 24778 deletions

View File

@ -2,7 +2,7 @@
FROM node:18-alpine AS build FROM node:18-alpine AS build
WORKDIR /app WORKDIR /app
COPY package.json ./ COPY package.json ./
RUN npm install --silent RUN npm install --silent --legacy-peer-deps
COPY . ./ COPY . ./
ENV NODE_OPTIONS=--openssl-legacy-provider ENV NODE_OPTIONS=--openssl-legacy-provider
RUN npm run build RUN npm run build

36577
frontend/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,14 +9,14 @@
"@testing-library/react": "^11.2.5", "@testing-library/react": "^11.2.5",
"@testing-library/user-event": "^12.8.3", "@testing-library/user-event": "^12.8.3",
"axios": "^0.21.1", "axios": "^0.21.1",
"react": "^17.0.1", "react": "^18.3.1",
"react-dom": "^18.3.1",
"react-code-blocks": "^0.0.8", "react-code-blocks": "^0.0.8",
"react-dom": "^17.0.1",
"react-dropzone": "^11.3.1", "react-dropzone": "^11.3.1",
"react-helmet": "^6.1.0", "react-helmet": "^6.1.0",
"react-lottie": "^1.2.3", "react-lottie": "^1.2.3",
"react-router-dom": "^5.2.0", "react-router-dom": "^5.2.0",
"react-scripts": "4.0.3", "react-scripts": "5.0.1",
"sass": "^1.32.8", "sass": "^1.32.8",
"sweetalert2": "^10.15.6", "sweetalert2": "^10.15.6",
"web-vitals": "^1.1.0" "web-vitals": "^1.1.0"

View File

@ -1,11 +1,11 @@
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom/client';
import App from './App'; import App from './App';
import './App.css'; import './App.css';
ReactDOM.render( const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode> <React.StrictMode>
<App /> <App />
</React.StrictMode>, </React.StrictMode>
document.getElementById('root')
); );