Skip to content

Commit

Permalink
Use vite instead of CRA
Browse files Browse the repository at this point in the history
  • Loading branch information
aflatter committed Dec 30, 2024
1 parent ca3c799 commit 1ce6aaf
Show file tree
Hide file tree
Showing 85 changed files with 6,696 additions and 15,242 deletions.
2 changes: 2 additions & 0 deletions src/webapp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

.swc
21 changes: 21 additions & 0 deletions src/webapp/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="apple-touch-icon" href="/logo192.png" />
<!--
manifest.json provides metadata used when your Web App is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json" />
<title>Phoniebox</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/index.jsx"></script>
</body>
</html>
21,835 changes: 6,638 additions & 15,197 deletions src/webapp/package-lock.json

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions src/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@
"react-dom": "^17.0.2",
"react-i18next": "^12.3.1",
"react-router-dom": "^6.18.0",
"react-scripts": "^5.0.1",
"url": "^0.11.3",
"uuid": "^9.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"start": "vite",
"build": "vite build"
},
"eslintConfig": {
"extends": [
Expand All @@ -49,6 +46,11 @@
]
},
"devDependencies": {
"markdownlint-cli2": "^0.12.1"
"@swc/plugin-emotion": "^8.0.2",
"@vitejs/plugin-react-swc": "^3.7.2",
"eslint": "^8.57.1",
"eslint-config-react-app": "^7.0.1",
"markdownlint-cli2": "^0.12.1",
"vite-plugin-checker": "^0.8.0"
}
}
39 changes: 0 additions & 39 deletions src/webapp/public/index.html

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
27 changes: 27 additions & 0 deletions src/webapp/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { defineConfig } from 'vite'
import reactSWC from '@vitejs/plugin-react-swc'
import checker from 'vite-plugin-checker';

// https://vite.dev/config/
export default defineConfig({
build: {
outDir: 'build',
},
define: {
// Workaround for jszmq -> assert -> util
'process.env': {},
},
plugins: [
checker({
eslint: {
lintCommand: 'eslint "./src/**/*.{js,jsx}"',
},
}),
reactSWC({
plugins: [['@swc/plugin-emotion', {}]]
}),
],
server: {
open: true,
}
})

0 comments on commit 1ce6aaf

Please sign in to comment.