Skip to content

Commit

Permalink
docs: Svelte v5 HMR tip (#4384)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Jan 16, 2025
1 parent b271adc commit 2ec2d1e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions website/docs/en/guide/framework/svelte.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Svelte

In this document, you will learn how to build a Svelte 5 or Svelte 4 application using Rsbuild.
In this document, you will learn how to build a Svelte application using Rsbuild.

## Create Svelte project

Expand All @@ -17,7 +17,7 @@ import { PackageManagerTabs } from '@theme';
}}
/>

Then select `Svelte 5` or `Svelte 4` when prompted to "Select framework".
Then select `Svelte` when prompted to "Select framework".

## Use Svelte in an existing project

Expand Down
4 changes: 4 additions & 0 deletions website/docs/en/plugins/list/plugin-svelte.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,7 @@ pluginSvelte({
},
});
```

## Notes

Currently, `svelte-loader` does not support HMR for Svelte v5, see [svelte-loader - Hot Reload](https://github.com/sveltejs/svelte-loader?tab=readme-ov-file#hot-reload).
4 changes: 2 additions & 2 deletions website/docs/zh/guide/framework/svelte.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Svelte

在这篇文档中,你可以了解到如何基于 Rsbuild 来构建一个 Svelte 5 或 Svelte 4 应用。
在这篇文档中,你可以了解到如何基于 Rsbuild 来构建一个 Svelte 应用。

## 创建 Svelte 项目

Expand All @@ -17,7 +17,7 @@ import { PackageManagerTabs } from '@theme';
}}
/>

然后在 `Select framework` 时选择 `Svelte 5``Svelte 4` 即可。
然后在 `Select framework` 时选择 `Svelte` 即可。

## 在已有项目中使用 Svelte

Expand Down
4 changes: 4 additions & 0 deletions website/docs/zh/plugins/list/plugin-svelte.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,7 @@ pluginSvelte({
},
});
```

## 注意事项

目前 `svelte-loader` 暂不支持 Svelte v5 热更新,详见 [svelte-loader - Hot Reload](https://github.com/sveltejs/svelte-loader?tab=readme-ov-file#hot-reload)

0 comments on commit 2ec2d1e

Please sign in to comment.