Skip to content

Commit a323bf0

Browse files
committed
migrate from CRA to VITE
1 parent 5674dc2 commit a323bf0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+4332
-18018
lines changed

.env.example

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
# SPDX-FileCopyrightText: © 2025 Siemens AG
33
# SPDX-FileContributor: Dearsh Oberoi <[email protected]>
44

5-
REACT_APP_BASE_URL='http://localhost:5000/api/v1'
6-
REACT_APP_DOMAIN_SUBDIRECTORY=''
5+
VITE_API_BASE_URL='http://localhost:5000/api/v1'
6+
VITE_API_DOMAIN_SUBDIRECTORY=''
77
PUBLIC_URL='http:localhost:3000'
88

99
# possible values are oidc or password. If password, ui for username-password
1010
# login will be shown, otherwise, ui for oidc will be shown.
1111
# if unset or some other value, username-password login flow will be shown by default
12-
REACT_APP_PROVIDER='password'
12+
VITE_API_PROVIDER='password'
1313

1414
#OIDC
15-
REACT_APP_CLIENT_ID='client-id'
16-
REACT_APP_AUTH_URL='provider authorization url'
17-
REACT_APP_TOKEN_URL='provider token url'
18-
REACT_APP_REDIRECT_URL='provider redirect url'
15+
VITE_API_CLIENT_ID='client-id'
16+
VITE_API_AUTH_URL='provider authorization url'
17+
VITE_API_TOKEN_URL='provider token url'
18+
VITE_API_REDIRECT_URL='provider redirect url'

eslint.config.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import { defineConfig, globalIgnores } from 'eslint/config'
6+
7+
export default defineConfig([
8+
globalIgnores(['dist']),
9+
{
10+
files: ['**/*.{js,jsx}'],
11+
extends: [
12+
js.configs.recommended,
13+
reactHooks.configs['recommended-latest'],
14+
reactRefresh.configs.vite,
15+
],
16+
languageOptions: {
17+
ecmaVersion: 2020,
18+
globals: globals.browser,
19+
parserOptions: {
20+
ecmaVersion: 'latest',
21+
ecmaFeatures: { jsx: true },
22+
sourceType: 'module',
23+
},
24+
},
25+
rules: {
26+
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
27+
},
28+
},
29+
])

eslint.config.mjs

Lines changed: 0 additions & 106 deletions
This file was deleted.

index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" href="/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<meta name="description" content="Web site created using Vite" />
9+
<link rel="apple-touch-icon" href="/logo192.png" />
10+
<link rel="manifest" href="/manifest.json" />
11+
<title>LicenseDb</title>
12+
</head>
13+
<body>
14+
<noscript>You need to enable JavaScript to run this app.</noscript>
15+
<div id="root"></div>
16+
<script type="module" src="/src/main.jsx"></script>
17+
</body>
18+
</html>

0 commit comments

Comments
 (0)