build(react): upgrade to react 18

pull/8/head
kaireewu 4 years ago
parent 487fd2b6c8
commit 556d0f31ff
No known key found for this signature in database
GPG Key ID: E904B5FF4F40BC01

@ -10,28 +10,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '14'
check-latest: true
# - name: Cache node modules
# uses: actions/cache@v2
# env:
# cache-name: cache-node-modules
# with:
# path: ~/.npm
# key: ${{ runner.os }}-node-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-node-${{ env.cache-name }}-
# ${{ runner.os }}-node-
# ${{ runner.os }}-
node-version: 16
cache: 'yarn'
- name: Install dependencies
run: yarn install
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Rename output dir

1
.gitignore vendored

@ -23,5 +23,4 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn.lock
package-lock.json

@ -9,6 +9,9 @@
"ant design"
],
"private": true,
"engines": {
"node": ">=16"
},
"homepage": ".",
"bugs": {
"url": "https://github.com/krwu/ServerStatus-web/issues"
@ -21,15 +24,18 @@
},
"dependencies": {
"@ant-design/icons": "^4.6.4",
"@babel/core": ">=7.0.0-0 <8.0.0",
"@babel/plugin-syntax-flow": "^7.14.5",
"@babel/plugin-transform-react-jsx": "^7.14.9",
"@types/node": "16.0.0",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/react": "18",
"@types/react-dom": "18",
"antd": "^4.0.0",
"babel-plugin-import": "^1.13.1",
"customize-cra": "^1.0.0",
"react": "^17.0.2",
"react": "18",
"react-app-rewired": "^2.2.1",
"react-dom": "^17.0.2",
"react-dom": "18",
"react-intl-universal": "^2.5.3",
"react-scripts": "^5.0.1",
"typescript": "^4.1.2"

@ -1,10 +1,15 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import './index.css';
import App from './App';
// import reportWebVitals from './reportWebVitals';
ReactDOM.render(<App />, document.getElementById('root'));
const el = document.getElementById('root');
if (el === null) {
throw new Error('root container missing in index.html');
}
const root = createRoot(el);
root.render(<StrictMode><App /></StrictMode>);
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))

11660
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save