Skip to content

Commit 4c34ae8

Browse files
ch: add redirect handler (#508) (#511)
fix: linting errors fix: fallback handler Co-authored-by: Fred Shema <[email protected]>
1 parent 266d7ed commit 4c34ae8

File tree

10 files changed

+3272
-4259
lines changed

10 files changed

+3272
-4259
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"sourceType": "module"
2020
},
2121
"plugins": ["react", "@typescript-eslint"],
22-
"ignorePatterns": ["/root/webpack.config.js"],
22+
"ignorePatterns": ["/root/vite.config.ts"],
2323
"rules": {
2424
"no-console": ["error"],
2525
"import/extensions": "off",

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
</head>
4949
<body class="dark:bg-dark-frame-bg">
5050
<div id="tree"></div>
51+
<script type="module" src="/src/index.tsx"></script>
5152
</body>
5253
</html>
5354
<!DOCTYPE html>

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable no-dupe-keys */
22
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
3-
module.exports = {
3+
export default {
44
preset: 'ts-jest',
55
testEnvironment: 'jsdom',
66
verbose: true,

package-lock.json

Lines changed: 3219 additions & 4235 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
"name": "atlp-pulse-fn",
33
"version": "2.0.0",
44
"description": "Dev pulse app",
5+
"type": "module",
56
"main": "src/index.tsx",
67
"scripts": {
7-
"dev": "webpack server",
8-
"build": "webpack",
8+
"dev": "vite",
9+
"build": "vite build",
910
"test": "npm run update-snapshots && npx jest --runInBand",
1011
"update-snapshots": "jest --updateSnapshot",
1112
"coverage": "jest --collect-coverage --silent -u",
@@ -50,6 +51,7 @@
5051
"@testing-library/dom": "^8.20.1",
5152
"@testing-library/user-event": "^14.4.3",
5253
"@types/node": "^20.4.2",
54+
"@vitejs/plugin-react": "^4.3.1",
5355
"ajv": "^8.12.0",
5456
"apollo-upload-client": "^17.0.0",
5557
"autoprefixer": "^10.4.14",
@@ -58,7 +60,6 @@
5860
"cleave.js": "^1.6.0",
5961
"cloudinary": "^1.39.0",
6062
"cloudinary-react": "^1.8.1",
61-
"copy-webpack-plugin": "^11.0.0",
6263
"crypto-browserify": "^3.12.0",
6364
"date-fns": "^2.30.0",
6465
"dotenv": "^16.3.1",
@@ -109,6 +110,8 @@
109110
"subscriptions-transport-ws": "^0.11.0",
110111
"tailwindcss": "^3.3.3",
111112
"url-polyfill": "^1.1.12",
113+
"vite": "^5.4.7",
114+
"vite-tsconfig-paths": "^5.0.1",
112115
"zod": "^3.23.8"
113116
},
114117
"devDependencies": {
@@ -150,7 +153,6 @@
150153
"faker": "5.5.3",
151154
"file-loader": "^6.2.0",
152155
"graphql": "^16.7.1",
153-
"html-webpack-plugin": "^5.5.0",
154156
"husky": "^8.0.3",
155157
"install": "^0.13.0",
156158
"jest": "^28.1.3",
@@ -171,10 +173,7 @@
171173
"tailwindcss": "^3.1.4",
172174
"ts-jest": "^28.0.8",
173175
"ts-loader": "^9.4.4",
174-
"typescript": "^4.9.5",
175-
"webpack": "^5.88.1",
176-
"webpack-cli": "^4.10.0",
177-
"webpack-dev-server": "^4.15.1"
176+
"typescript": "^4.9.5"
178177
},
179178
"lint-staged": {
180179
"*.{js,ts,tsx}": "eslint --fix",

postcss.config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const tailwindcss = require('tailwindcss');
2-
const autoprefixer = require('autoprefixer');
3-
4-
module.exports = {
5-
plugins: [tailwindcss('./tailwind.config.js'), autoprefixer],
1+
export default {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
66
};

src/components/InvitationTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,4 +179,4 @@ function DataTableStats({ data, columns, error, loading }: TableData) {
179179
);
180180
}
181181

182-
export default DataTableStats;
182+
export default DataTableStats;

src/pages/GradingSystem.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import GRADING_SYSTEM_QUERY from './GradingSystemQuery';
1313
import MAKE_DEFAULT_GRADING_SYSTEM from '../Mutations/MakeDefault';
1414
import GRADING_SYSTEM_MUTATION from './GradingSystemMutation';
1515
import AddGradingSystem from './gradeSystem/addNew';
16-
import GradingSkeleton from '../Skeletons/gradingSkeleton'
16+
import GradingSkeleton from '../Skeletons/gradingSkeleton';
17+
1718
type grade = {
1819
grade?: string;
1920
range?: string;
@@ -278,12 +279,12 @@ function GradingSystem() {
278279
{value === '' && (
279280
<div className="">
280281
<div className="max-w-full">
281-
<DataTable
282-
columns={GradingsColumn}
283-
loading={gradeLoading}
284-
data={gradingData}
285-
title={t('Gradings List')}
286-
/>
282+
<DataTable
283+
columns={GradingsColumn}
284+
loading={gradeLoading}
285+
data={gradingData}
286+
title={t('Gradings List')}
287+
/>
287288
</div>
288289
</div>
289290
)}

target/npmlist.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"chart.js": { "version": "4.3.0" },
2828
"cleave.js": { "version": "1.6.0" },
2929
"cloudinary-react": { "version": "1.8.1" },
30-
"copy-webpack-plugin": { "version": "11.0.0" },
3130
"crypto-browserify": { "version": "3.12.0" },
3231
"date-fns": { "version": "2.30.0" },
3332
"dotenv": { "version": "16.3.1" },

vite.config.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { defineConfig } from 'vite';
2+
import react from '@vitejs/plugin-react';
3+
import dotenv from 'dotenv';
4+
import path from 'path';
5+
import viteTsconfigPaths from 'vite-tsconfig-paths';
6+
7+
dotenv.config();
8+
9+
export default defineConfig({
10+
plugins: [react(), viteTsconfigPaths()],
11+
resolve: {
12+
alias: {
13+
'chart.js': 'chart.js/auto',
14+
crypto: 'crypto-browserify',
15+
},
16+
},
17+
server: {
18+
port: 3001,
19+
open: true,
20+
strictPort: true,
21+
},
22+
build: {
23+
outDir: 'build',
24+
sourcemap: true,
25+
},
26+
define: {
27+
'process.env': JSON.stringify(process.env),
28+
},
29+
});

0 commit comments

Comments
 (0)