Skip to content

Commit e865d0d

Browse files
committed
fix: vite
1 parent a22c7f2 commit e865d0d

36 files changed

Lines changed: 1391 additions & 2159 deletions

.eslintignore

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

.eslintrc.json

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

.parcelrc

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

.postcssrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"plugins": {
33
"tailwindcss": {}
44
}
5-
}
5+
}

eslint.config.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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 tseslint from 'typescript-eslint';
6+
7+
export default tseslint.config(
8+
{ ignores: ['dist'] },
9+
{
10+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
11+
files: ['**/*.{ts,tsx}'],
12+
languageOptions: { ecmaVersion: 2020, globals: globals.browser },
13+
plugins: { 'react-hooks': reactHooks, 'react-refresh': reactRefresh },
14+
rules: {
15+
...reactHooks.configs.recommended.rules,
16+
'react-refresh/only-export-components': [
17+
'off',
18+
{ allowConstantExport: true },
19+
],
20+
'@typescript-eslint/no-explicit-any': 'off',
21+
'react-hooks/exhaustive-deps': 'off',
22+
},
23+
},
24+
);

index.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!doctype html>
2+
<html lang="TODO:">
3+
4+
<head>
5+
<meta charset="utf-8" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="robots" content="index, follow" />
8+
<link rel="icon" type="image/png" sizes="96x96" href="./assets/images/favicon-96x96.png" />
9+
<link rel="icon" type="image/png" sizes="32x32" href="./assets/images/favicon-32x32.png" />
10+
<link rel="icon" type="image/png" sizes="16x16" href="./assets/images/favicon-16x16.png" />
11+
<link href="./src/styles.css" rel="stylesheet" />
12+
<title>TODO:</title>
13+
<!-- Google tag (gtag.js) -->
14+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXX"></script>
15+
<script>
16+
window.dataLayer = window.dataLayer || [];
17+
function gtag() {
18+
dataLayer.push(arguments);
19+
}
20+
gtag('js', new Date());
21+
22+
gtag('config', 'G-XXXXXXXXX');
23+
</script>
24+
</head>
25+
26+
<body>
27+
<div id="app"></div>
28+
<script type="module" src="/src/index.tsx"></script>
29+
</body>
30+
31+
</html>

package.json

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"repository": "git@github.com:veeso/fe-react-template.git",
55
"author": "Christian Visintin <christian.visintin@veeso.dev>",
66
"license": "MIT",
7+
"type": "module",
78
"browserslist": {
89
"production": [
910
"> 5%",
@@ -17,17 +18,17 @@
1718
]
1819
},
1920
"scripts": {
20-
"build:release": "yarn clean && parcel build src/index.html --reporter @parcel/reporter-bundle-analyzer && cp sitemap.xml dist/sitemap.xml && cp robots.txt dist/robots.txt",
21-
"clean": "rm -rf dist/* .parcel-cache/",
22-
"dev": "parcel src/index.html",
23-
"lint": "eslint . --ext .ts --ext .tsx --max-warnings=0",
21+
"dev": "vite --port 3000",
22+
"build": "tsc -b && vite build",
23+
"clean": "rm -rf dist/*",
24+
"lint": "eslint .",
2425
"prettier": "prettier --config .prettierrc --write src/",
25-
"prettier:check": "prettier --config .prettierrc --check src/"
26+
"prettier:check": "prettier --config .prettierrc --check src/",
27+
"preview": "vite preview"
2628
},
2729
"dependencies": {
28-
"animate.css": "^4.1",
2930
"js-cookie": "^3.0",
30-
"leaflet": "^1.9.4",
31+
"leaflet": "^1",
3132
"react": "^19",
3233
"react-dom": "^19",
3334
"react-helmet": "^6.1",
@@ -36,25 +37,28 @@
3637
"react-router-dom": "^6.22"
3738
},
3839
"devDependencies": {
39-
"@parcel/reporter-bundle-analyzer": "^2.11.0",
40-
"@parcel/transformer-typescript-tsc": "^2.13.0",
41-
"@types/leaflet": "^1.9.15",
40+
"@eslint/js": "^9",
4241
"@types/gtag.js": "^0.0.20",
43-
"@types/js-cookie": "^3.0.6",
44-
"@types/react": "^18.2",
45-
"@types/react-dom": "^18.2",
46-
"@types/react-helmet": "^6.1.11",
47-
"@types/react-lazyload": "^3.2.3",
48-
"@types/react-router-dom": "^5.3.3",
42+
"@types/js-cookie": "^3",
43+
"@types/leaflet": "^1",
44+
"@types/node": "^22.13.4",
45+
"@types/react": "19",
46+
"@types/react-dom": "19",
47+
"@types/react-helmet": "^6",
48+
"@types/react-lazyload": "^3",
49+
"@types/react-router-dom": "^5",
4950
"@typescript-eslint/eslint-plugin": "^8",
5051
"@typescript-eslint/parser": "^8",
51-
"eslint": "^8",
52-
"eslint-config-prettier": "^9.1",
53-
"parcel": "^2.13",
52+
"@vitejs/plugin-react": "^4.3.4",
53+
"eslint": "^9",
54+
"eslint-plugin-react-hooks": "^5.1.0",
55+
"eslint-plugin-react-refresh": "^0.4.19",
5456
"postcss": "^8.4",
5557
"prettier": "^3",
5658
"process": "^0.11.10",
57-
"tailwindcss": "^3.4",
58-
"typescript": "^5.3"
59+
"tailwindcss": "^3",
60+
"typescript": "~5.7.3",
61+
"typescript-eslint": "^8",
62+
"vite": "^6"
5963
}
60-
}
64+
}
File renamed without changes.
File renamed without changes.

src/App.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import * as React from 'react';
2-
31
import { BrowserRouter } from 'react-router-dom';
42

53
import Router from './Router';

0 commit comments

Comments
 (0)