feat: add readme vite example
This commit is contained in:
@@ -1,30 +1,26 @@
|
|||||||
# React + TypeScript + Vite
|
# Vite React Example
|
||||||
|
|
||||||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
This repository contains an example of vuejs application that is deployed on Dokploy.
|
||||||
|
|
||||||
Currently, two official plugins are available:
|
|
||||||
|
|
||||||
- [@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
|
1. **Use Git Provider in Your Application**:
|
||||||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
- Repository: `https://github.com/Dokploy/examples.git`
|
||||||
|
- Branch: `main`
|
||||||
|
- Build path: `/vite-simple`
|
||||||
|
|
||||||
## Expanding the ESLint configuration
|
2. **Add Environment Variables**:
|
||||||
|
- Navigate to the "Environments" tab and add the following variable:
|
||||||
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
|
```plaintext
|
||||||
|
NIXPACKS_START_CMD="pnpm run preview"
|
||||||
- Configure the top-level `parserOptions` property like this:
|
|
||||||
|
|
||||||
```js
|
|
||||||
export default {
|
|
||||||
// other rules...
|
|
||||||
parserOptions: {
|
|
||||||
ecmaVersion: 'latest',
|
|
||||||
sourceType: 'module',
|
|
||||||
project: ['./tsconfig.json', './tsconfig.node.json'],
|
|
||||||
tsconfigRootDir: __dirname,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
|
3. **Click on Deploy**:
|
||||||
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
|
- Deploy your application by clicking the deploy button.
|
||||||
- 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
|
|
||||||
|
4. **Generate a Domain**:
|
||||||
|
- Click on generate domain button.
|
||||||
|
- A new domain will be generated for you.
|
||||||
|
- You can use this domain to access your application.
|
||||||
|
|
||||||
|
|
||||||
|
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||||
|
|||||||
Reference in New Issue
Block a user