Decouple client from server
Add Vite dependency and remove server side rendering to make it
possible to run the client independently.
Remove webpack config, replace with the `Vite` build tool.
GitLab: #55
Change-Id: I3a05d2e86cf6cb0ab91e77b3696f393132137575
diff --git a/client/package.json b/client/package.json
index 585e35f..6eb5ca7 100644
--- a/client/package.json
+++ b/client/package.json
@@ -2,11 +2,13 @@
"name": "jami-web-client",
"version": "0.1.0",
"private": true,
- "type": "module",
"scripts": {
- "build": "webpack",
+ "start": "vite",
+ "start:prod": "vite preview",
+ "build": "tsc && vite build",
"clean": "rm -rf dist",
- "lint": "eslint src",
+ "test": "jest src",
+ "lint": "eslint .",
"lint:fix": "npm run lint -- --fix",
"format": "prettier --write src",
"format:check": "prettier --check src",
@@ -24,7 +26,6 @@
]
},
"dependencies": {
- "@babel/runtime": "7.18.9",
"@emotion/react": "^11.10.0",
"@emotion/styled": "^11.10.0",
"@mui/icons-material": "^5.10.3",
@@ -40,13 +41,11 @@
"@types/jest": "^28.1.8",
"axios": "^0.27.2",
"dayjs": "^1.11.5",
- "dotenv": "^16.0.2",
"emoji-picker-react": "^3.6.1",
"framer-motion": "^7.3.5",
"i18next": "^21.9.2",
"jami-web-common": "file:../common",
"qrcode.react": "^3.1.0",
- "raw-loader": "^4.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-emoji-render": "^1.2.4",
@@ -58,30 +57,17 @@
"socket.io-client": "^4.5.2"
},
"devDependencies": {
- "@babel/core": "^7.19.1",
- "@babel/plugin-transform-runtime": "^7.19.1",
- "@babel/preset-env": "^7.19.1",
- "@babel/preset-react": "^7.18.6",
- "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
- "@svgr/webpack": "^6.3.1",
"@types/node": "^18.7.13",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@types/react-modal": "^3.13.1",
- "babel-loader": "^8.2.5",
- "copy-webpack-plugin": "^11.0.0",
- "css-loader": "^6.7.1",
+ "@vitejs/plugin-react": "^2.1.0",
"eslint-plugin-react": "^7.31.8",
"eslint-plugin-react-hooks": "^4.6.0",
- "html-webpack-plugin": "^5.5.0",
"i18next-parser": "^6.5.0",
- "react-refresh": "^0.14.0",
"sass": "^1.54.5",
- "sass-loader": "^13.0.2",
- "style-loader": "^3.3.1",
- "ts-loader": "^9.3.1",
"typescript": "^4.7.4",
- "webpack": "^5.74.0",
- "webpack-cli": "^4.10.0"
+ "vite": "^3.1.8",
+ "vite-plugin-svgr": "^2.2.2"
}
}