You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
5
+
A modern, multilingual website built with React, TypeScript, and Vite.
6
6
7
-
Currently, two official plugins are available:
7
+
## 📋 Prerequisites
8
8
9
-
-[@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
10
-
-[@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
+
Before you begin, ensure you have the following installed:
11
10
12
-
## Expanding the ESLint configuration
11
+
-**Node.js** v20.x or higher ([Download here](https://nodejs.org/))
12
+
-**Corepack** (included with Node.js 16.9+)
13
13
14
-
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
14
+
## 🚀 Getting Started
15
15
16
-
- Configure the top-level `parserOptions` property like this:
16
+
### 1. Enable Corepack
17
+
18
+
This project uses Yarn 4.x, which requires Corepack to be enabled:
19
+
20
+
```bash
21
+
corepack enable
22
+
```
23
+
24
+
> **Note:** Corepack is included by default with Node.js 16.9+ and will automatically use the correct Yarn version specified in `package.json`.
25
+
26
+
> **Windows Users:** You need to run this command in PowerShell **as Administrator** (Win + X → "Terminal (Admin)"). This is a one-time setup.
27
+
28
+
### 2. Install Dependencies
29
+
30
+
```bash
31
+
yarn install
32
+
```
33
+
34
+
If you encounter engine compatibility issues with the `sharp` package, use:
35
+
36
+
```bash
37
+
yarn add sharp
38
+
# The YARN_IGNORE_NODE environment variable can be set if needed
39
+
```
40
+
41
+
### 3. Run Development Server
42
+
43
+
```bash
44
+
yarn dev
45
+
```
46
+
47
+
The development server will start at `http://localhost:5173` (or another available port).
-**Dependency Caching:** Caches Yarn dependencies for faster builds (~140 MB)
99
+
-**Auto-deployment:** Deploys to GitHub Pages on push to `main`
100
+
101
+
## 📝 Development Notes
102
+
103
+
### Using Yarn 4.x
104
+
105
+
This project uses Yarn Berry (v4.12.0). Key differences from Yarn 1.x:
106
+
107
+
- ✅ Faster installs with better caching
108
+
- ✅ More efficient dependency resolution
109
+
- ✅ Better security with zero-installs support
110
+
- ⚠️ Some CLI flags differ from Yarn 1.x (e.g., use `YARN_IGNORE_NODE=1` instead of `--ignore-engines`)
111
+
112
+
### ESLint Configuration
113
+
114
+
For production applications, consider enabling type-aware lint rules:
17
115
18
116
```js
19
117
exportdefault {
20
-
// other rules...
21
118
parserOptions: {
22
119
ecmaVersion:'latest',
23
120
sourceType:'module',
@@ -27,14 +124,14 @@ export default {
27
124
};
28
125
```
29
126
30
-
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
127
+
Then update to use `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`.
33
128
34
-
## Important Note
129
+
## 📄 License
35
130
36
-
To fix the `sharp` package engine error on build, run the following command:
131
+
This project is licensed under the [GNU General Public License v3.0](LICENSE).
37
132
38
-
```bash
39
-
yarn add sharp --ignore-engines
40
-
```
133
+
You are free to use, modify, and distribute this software under the terms of the GPL-3.0 license.
134
+
135
+
## 🤝 Contributing
136
+
137
+
Contributions are welcome! Please ensure your code follows the project's ESLint and Prettier configurations.
0 commit comments