Skip to content

Commit 41fdbd2

Browse files
committed
docs: sync latest updates
1 parent 07c01bc commit 41fdbd2

File tree

8 files changed

+47
-29
lines changed

8 files changed

+47
-29
lines changed

docs/.vitepress/theme/styles/base.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,17 @@ mjx-container {
250250
mjx-container > svg {
251251
margin: auto;
252252
}
253+
254+
table.roadmap {
255+
table-layout: fixed;
256+
width: 100%;
257+
258+
}
259+
260+
table.roadmap td:nth-child(2n) {
261+
width: 100%;
262+
}
263+
264+
.release {
265+
font-size: 1.2em;
266+
}

docs/react/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,9 @@ giget gh:fastify/fastify-vite/starters/react-kitchensink#dev your-app
8383

8484
All dependencies from **react-base**.
8585

86-
8786
## Known limitations
8887

89-
- It's currently impossible to run **multiple** Vite development server middleware in your Fastify server, which means `@fastify/vite` can **only be registered once**.
88+
- It's currently impossible to run **multiple** Vite development servers, which means `@fastify/vite` can **only be registered once**. Vite's new [Environment API](https://vite.dev/guide/api-environment) was created to avoid this necessity.
9089

9190
- `@fastify/react` currently has no support for producing a fully functional **static bundle**, that is, even when you use [`clientOnly`](/react/rendering-modes#client-only), you'd need to be running the Fastify server integrated with the `@fastify/vite` renderer. SPA support is planned for the next major release, see the [project roadmap](/roadmap).
9291

docs/react/project-structure.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ A `@fastify/react` project must have at the very least:
4343

4444
A Fastify server file that registers `@fastify/vite`.
4545

46-
Or a **plugin** file if running [`fastify-cli`]() or [`platformatic`]().
47-
4846
</td>
4947
</tr>
5048
<tr>

docs/react/router-setup.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ export defaut function MyPage () {
1818

1919
## Routes location
2020

21-
You can also change the glob pattern used to determine where to route modules from. Internally, this setting is passed to [Vite's glob importer](https://vitejs.dev/guide/features.html#glob-import).
21+
Internally, the route modules location is set via the `$app/routes.js` [virtual module](/react/project-structure#smart-imports), which is defined as follows by default:
22+
23+
```js
24+
export default import.meta.glob('/pages/**/*.{jsx,tsx}')
25+
```
26+
27+
To change the location where routes are loaded from, just place a `routes.js` file at your Vite project's root directory and `@fastify/react/plugin` will automatically recognize it and use it instead.
2228

2329
In your Vite configuration file:
2430

docs/roadmap.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,50 @@
11
# Roadmap
22

33

4-
<table>
4+
<table class="roadmap">
55
<thead>
66
<tr>
7-
<th>Next releases</th>
7+
<th>Next majors</th>
88
<th>Description</th>
99
</tr>
1010
</thead>
1111
<tbody>
1212
<tr>
1313
<td valign="top">
1414

15-
`@fastify/react`
15+
<br>
1616

17-
`@fastify/vue`
17+
<span class="release">
18+
19+
**`@fastify/[email protected]`**
20+
21+
</span>
22+
23+
<br>
1824

1925
<small>
2026

2127
**Target date**
2228

2329
</small>
2430

25-
March 2024
31+
July 2025
2632

2733
</td>
2834
<td valign="top">
2935

30-
Planned for the next minor release:
36+
Planned for this release:
37+
38+
- **Rewrite core in TypeScript**
39+
- **Deprecate CJS support**
40+
- **Revised HMR integration**
3141

32-
- Implement Vite's Runtime API.
33-
- Full hot reload support even without `createRenderFunction()`
42+
For a long time `@fastify/vite` resisted a TypeScript rewrite, staying true to Fastify's original JavaScript style, which to this date remains CJS written in the same form as seen in Node.js' own internal JavaScript libraries.
43+
44+
The next major release of `@fastify/vite` will have a TypeScript core and will be compiled to ESM. This release will be coupled with a PR to Fastify itself supporting `import()` Promises in plugin registration calls.
3445

3546
</td>
3647
</tr>
48+
3749
</tbody>
3850
</table>
39-
40-
For **`@fastify/vue`** and **`@fastify/react`**, until the `v1.0.0` release everything can change, and I'd very much like to see [new contributors](/contributing) enhancing the currernt core application shell implemented on those packages and changing what this roadmap looks like in the process!

docs/vue/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ All dependencies from **vue-base**.
8282

8383
## Known limitations
8484

85-
- It's currently impossible to run **multiple** Vite development server middleware in your Fastify server, which means `@fastify/vite` can **only be registered once**.
85+
- It's currently impossible to run **multiple** Vite development servers, which means `@fastify/vite` can **only be registered once**. Vite's new [Environment API](https://vite.dev/guide/api-environment) was created to avoid this necessity.
8686

8787
- `@fastify/vue` currently has no support for producing a fully functional **static bundle**, that is, even when you use [`clientOnly`](/vue/rendering-modes#client-only), you'd need to be running the Fastify server integrated with the `@fastify/vite` renderer. SPA support is planned for the next major release, see the [project roadmap](/roadmap).
8888

docs/vue/project-structure.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ A `@fastify/vue` project must have at the very least:
4343

4444
A Fastify server file that registers `@fastify/vite`.
4545

46-
Or a **plugin** file if running [`fastify-cli`]() or [`platformatic`]().
47-
4846
</td>
4947
</tr>
5048
<tr>

docs/vue/router-setup.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,14 @@ export const path = '/my-page'
2020

2121
## Routes location
2222

23-
You can also change the glob pattern used to determine where to route modules from. Internally, this setting is passed to [Vite's glob importer](https://vitejs.dev/guide/features.html#glob-import).
24-
25-
In your Vite configuration file:
23+
Internally, the route modules location is set via the `$app/routes.js` [virtual module](/vue/project-structure#smart-imports), which is defined as follows by default:
2624

2725
```js
28-
import viteFastifyVue from '@fastify/vue/plugin'
29-
30-
export default {
31-
plugins: [
32-
// ...
33-
viteFastifyVue({ globPattern: '/views/**/*.vue' }),
34-
]
35-
}
26+
export default import.meta.glob('/pages/**/*.vue')
3627
```
3728

29+
To change the location where routes are loaded from, just place a `routes.js` file at your Vite project's root directory and `@fastify/vue/plugin` will automatically recognize it and use it instead.
30+
3831
## Dynamic parameters
3932

4033
Dynamic route parameters uses `[param]` for a singular parameter and `[param+]` for wildcard routes.

0 commit comments

Comments
 (0)