Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/upstream-sync'
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa-nematpour committed Jan 16, 2025
2 parents 8737aed + 47416cd commit 6f4909e
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ export default defineConfig({
link: '/guide/api-environment',
},
{
text: 'Environment instances',
text: 'Environment Instances',
link: '/guide/api-environment-instances',
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import logoLaravel from './images/laravel.svg'
import logoAdonis from './images/adonis.svg'
import logoEmber from './images/ember.svg'
import logoPreact from './images/preact.svg'
import logoHono from './images/hono.svg'
/**
* The frameworks and tools to display in this section.
Expand Down Expand Up @@ -164,6 +165,13 @@ const frameworks: Framework[] = [
url: 'https://emberjs.com/',
visible: ref(false),
},
{
name: 'Hono',
logo: logoHono,
color: '#ff5c13',
url: 'https://hono.dev/',
visible: ref(false),
},
]
// Starting parameters
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions docs/guide/api-environment-runtimes.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,28 +304,28 @@ function createWorkerEnvironment(name, config, context) {
const handlerToWorkerListener = new WeakMap()

const workerHotChannel = {
send: (data) => w.postMessage(data),
send: (data) => worker.postMessage(data),
on: (event, handler) => {
if (event === 'connection') return

const listener = (value) => {
if (value.type === 'custom' && value.event === event) {
const client = {
send(payload) {
w.postMessage(payload)
worker.postMessage(payload)
},
}
handler(value.data, client)
}
}
handlerToWorkerListener.set(handler, listener)
w.on('message', listener)
worker.on('message', listener)
},
off: (event, handler) => {
if (event === 'connection') return
const listener = handlerToWorkerListener.get(handler)
if (listener) {
w.off('message', listener)
worker.off('message', listener)
handlerToWorkerListener.delete(handler)
}
},
Expand Down
4 changes: 0 additions & 4 deletions docs/guide/ssr.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ This is a low-level API meant for library and framework authors. If your goal is
Currently, Vite is working on an improved SSR API with the [Environment API](https://github.com/vitejs/vite/discussions/16358). Check out the link for more details.
:::

:::tip Help
If you have questions, the community is usually helpful at [Vite Discord's #ssr channel](https://discord.gg/PkbxgzPhJv).
:::

## Example Projects

Vite provides built-in support for server-side rendering (SSR). [`create-vite-extra`](https://github.com/bluwy/create-vite-extra) contains example SSR setups you can use as references for this guide:
Expand Down
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"docs-serve": "vitepress serve"
},
"devDependencies": {
"@shikijs/vitepress-twoslash": "^1.24.4",
"@shikijs/vitepress-twoslash": "^1.26.1",
"@types/express": "^4.17.21",
"feed": "^4.2.2",
"vitepress": "^1.5.0",
"vitepress-plugin-group-icons": "^1.3.2",
"vitepress-plugin-group-icons": "^1.3.3",
"vue": "^3.5.13"
}
}

0 comments on commit 6f4909e

Please sign in to comment.