Skip to content

Commit

Permalink
Migrate to solid
Browse files Browse the repository at this point in the history
  • Loading branch information
spidunno committed May 27, 2024
1 parent edbe023 commit 6660b87
Show file tree
Hide file tree
Showing 13 changed files with 228 additions and 3,666 deletions.
42 changes: 20 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
# React + TypeScript + Vite
## Usage

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
```bash
$ npm install # or pnpm install or yarn install
```

Currently, two official plugins are available:
### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)

- [@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
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
## Available Scripts

## Expanding the ESLint configuration
In the project directory, you can run:

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
### `npm run dev`

- Configure the top-level `parserOptions` property like this:
Runs the app in the development mode.<br>
Open [http://localhost:5173](http://localhost:5173) to view it in the browser.

```js
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
```
### `npm run build`

Builds the app for production to the `dist` folder.<br>
It correctly bundles Solid in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.<br>
Your app is ready to be deployed!

## Deployment

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-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
Learn more about deploying your application with the [documentations](https://vitejs.dev/guide/static-deploy.html)
Binary file modified bun.lockb
100644 → 100755
Binary file not shown.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<title>Vite + Solid + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
Loading

0 comments on commit 6660b87

Please sign in to comment.