Skip to content

Commit f5e3255

Browse files
Merge pull request #3 from aroskanalen/feature/1541-update-node-migrate-CRA-to-vite
1541 update node migrate cra to vite
2 parents 3475df7 + a80ec33 commit f5e3255

23 files changed

+2806
-10348
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44

55
## Unreleased
66

7+
- [#126](https://github.com/aroskanalen/display-client/pull/3)
8+
- Migrate from CRA to Vite
9+
- Upgrade node from 14 -> 20
10+
- Winston logging to Pino logging
11+
712
## [2.0.3] - 2024-05-21
813

914
- [#125](https://github.com/os2display/display-client/pull/125)

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ services:
2929
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
3030

3131
node:
32-
image: node:14
32+
image: node:20
3333
command: yarn start
3434
networks:
3535
- app

public/index.html renamed to index.html

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,15 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
5+
<link rel="icon" href="/favicon.ico" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<meta name="theme-color" content="#000000" />
88
<meta name="google" content="notranslate" />
99
<meta
1010
name="description"
1111
content="OS2Display client"
1212
/>
13-
<!--
14-
manifest.json provides metadata used when your web app is installed on a
15-
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16-
-->
17-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18-
<!--
19-
Notice the use of %PUBLIC_URL% in the tags above.
20-
It will be replaced with the URL of the `public` folder during the build.
21-
Only files inside the `public` folder can be referenced from the HTML.
22-
23-
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24-
work correctly both with client-side routing and a non-root public URL.
25-
Learn how to configure a non-root public URL by running `npm run build`.
26-
-->
13+
<link rel="manifest" href="/manifest.json" />
2714
<title>OS2Display</title>
2815
</head>
2916
<body>
@@ -39,5 +26,6 @@
3926
To begin the development, run `npm start` or `yarn start`.
4027
To create a production bundle, use `npm run build` or `yarn build`.
4128
-->
29+
<script type="module" src="/src/index.jsx"></script>
4230
</body>
4331
</html>

package.json

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,18 @@
1212
"jwt-decode": "^3.1.2",
1313
"lodash.clonedeep": "^4.5.0",
1414
"lodash.last": "^3.0.0",
15-
"os2display-grid-generator": "^1.0.8",
15+
"os2display-grid-generator": "^1.0.10",
16+
"pino": "^9.1.0",
1617
"prop-types": "^15.7.2",
1718
"react": "^18.2.0",
18-
"react-app-rewired": "^2.1.8",
1919
"react-dom": "^18.2.0",
2020
"react-intl": "^5.20.2",
2121
"react-transition-group": "^4.4.2",
2222
"rrule": "^2.6.8",
2323
"sass": "^1.37.5",
2424
"styled-components": "^5.3.1",
2525
"suncalc": "^1.9.0",
26-
"ulid": "^2.3.0",
27-
"web-vitals": "^1.0.1",
28-
"winston": "^3.3.3"
26+
"ulid": "^2.3.0"
2927
},
3028
"scripts": {
3129
"lint:js": "eslint --ext .js --ext .jsx ./src",
@@ -34,9 +32,9 @@
3432
"lint:scss:fix": "stylelint --fix \"./src/**/*.scss\"",
3533
"check-coding-standards": "npm run lint:js && npm run lint:scss",
3634
"apply-coding-standards": "npm run lint:js:fix && npm run lint:scss:fix",
37-
"start": "react-app-rewired start",
38-
"build": "react-app-rewired build",
39-
"eject": "react-app-rewired eject"
35+
"start": "vite --host 0.0.0.0",
36+
"build": "vite build",
37+
"serve": "vite preview"
4038
},
4139
"eslintConfig": {
4240
"extends": [
@@ -57,17 +55,20 @@
5755
]
5856
},
5957
"devDependencies": {
60-
"react-scripts": "4.0.3",
58+
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
59+
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
6160
"@testing-library/jest-dom": "^5.11.4",
6261
"@testing-library/react": "^11.1.0",
6362
"@testing-library/user-event": "^12.1.10",
63+
"@vitejs/plugin-react": "^4.3.0",
64+
"@vitejs/plugin-react-swc": "^3.7.0",
6465
"babel-eslint": "^10.1.0",
6566
"eslint": "^7.32.0",
6667
"eslint-config-airbnb": "^18.2.1",
6768
"eslint-config-prettier": "^8.3.0",
6869
"eslint-plugin-cypress": "^2.11.3",
6970
"eslint-plugin-import": "^2.24.0",
70-
"eslint-plugin-jsdoc": "^36.0.7",
71+
"eslint-plugin-jsdoc": "^35.4.3",
7172
"eslint-plugin-jsx-a11y": "^6.4.1",
7273
"eslint-plugin-only-warn": "^1.0.3",
7374
"eslint-plugin-prettier": "^3.4.0",
@@ -77,6 +78,8 @@
7778
"stylelint-config-prettier": "^8.0.2",
7879
"stylelint-config-recommended-scss": "^4.3.0",
7980
"stylelint-prettier": "^1.2.0",
80-
"stylelint-scss": "^3.19.0"
81+
"stylelint-scss": "^3.19.0",
82+
"vite": "^5.2.12",
83+
"vite-plugin-svgr": "^4.2.0"
8184
}
8285
}

0 commit comments

Comments
 (0)