Skip to content

Commit 92b878d

Browse files
#502 web-perfomance load time
1 parent f0d1c91 commit 92b878d

File tree

9 files changed

+3234
-4076
lines changed

9 files changed

+3234
-4076
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: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,14 @@
4141
rel="stylesheet"
4242
/> -->
4343

44-
<link href="https://fonts.googleapis.com/css2?family=PT+Serif:wght@400;700&display=swap" rel="stylesheet">
45-
44+
<link
45+
href="https://fonts.googleapis.com/css2?family=PT+Serif:wght@400;700&display=swap"
46+
rel="stylesheet"
47+
/>
4648
</head>
4749
<body class="dark:bg-dark-frame-bg">
4850
<div id="tree"></div>
51+
<script type="module" src="/src/index.tsx"></script>
4952
</body>
5053
</html>
5154
<!DOCTYPE html>
@@ -90,8 +93,10 @@
9093
href="https://fonts.googleapis.com/css2?family=Inria+Serif:ital@1&family=Lexend+Deca:wght@600&family=Open+Sans:wght@300;400;600;700;800&display=swap"
9194
rel="stylesheet"
9295
/> -->
93-
<link href="https://fonts.googleapis.com/css2?family=PT+Serif:wght@400;700&display=swap" rel="stylesheet">
94-
96+
<link
97+
href="https://fonts.googleapis.com/css2?family=PT+Serif:wght@400;700&display=swap"
98+
rel="stylesheet"
99+
/>
95100
</head>
96101
<body>
97102
<div id="tree"></div>

package-lock.json

Lines changed: 3180 additions & 3978 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",
@@ -108,6 +109,8 @@
108109
"subscriptions-transport-ws": "^0.11.0",
109110
"tailwindcss": "^3.3.3",
110111
"url-polyfill": "^1.1.12",
112+
"vite": "^5.4.7",
113+
"vite-tsconfig-paths": "^5.0.1",
111114
"zod": "^3.23.8"
112115
},
113116
"devDependencies": {
@@ -149,7 +152,6 @@
149152
"faker": "5.5.3",
150153
"file-loader": "^6.2.0",
151154
"graphql": "^16.7.1",
152-
"html-webpack-plugin": "^5.5.0",
153155
"husky": "^8.0.1",
154156
"install": "^0.13.0",
155157
"jest": "^28.1.3",
@@ -170,10 +172,7 @@
170172
"tailwindcss": "^3.1.4",
171173
"ts-jest": "^28.0.8",
172174
"ts-loader": "^9.4.4",
173-
"typescript": "^4.9.5",
174-
"webpack": "^5.88.1",
175-
"webpack-cli": "^4.10.0",
176-
"webpack-dev-server": "^4.15.1"
175+
"typescript": "^4.9.5"
177176
},
178177
"lint-staged": {
179178
"*.{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: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,8 @@ function DataTableStats({ data, columns, error, loading }: TableData) {
6262
};
6363

6464
return (
65-
<div
66-
className={``}
67-
>
68-
<div className="flex items-center justify-between pb-6 ">
69-
</div>
65+
<div className="">
66+
<div className="flex items-center justify-between pb-6 " />
7067
<div style={{ overflowX: 'auto' }}>
7168
<table className="min-w-full leading-normal" {...getTableProps()}>
7269
<thead>
@@ -178,5 +175,4 @@ function DataTableStats({ data, columns, error, loading }: TableData) {
178175
);
179176
}
180177

181-
182-
export default DataTableStats;
178+
export default DataTableStats;

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+
});

webpack.config.js

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

0 commit comments

Comments
 (0)