Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add notice about htmlRspackPlugin not support ejs syntax #7652

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions website/docs/en/plugins/rspack/html-rspack-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ The features of `rspack.HtmlRspackPlugin` are a subset of `html-webpack-plugin`.

If its options do not meet your needs, you can also directly use the community [html-webpack-plugin](https://www.npmjs.com/package/html-webpack-plugin).

:::warning
`rspack.HtmlRspackPlugin` does not support the full `ejs` syntax; it only supports a subset of the `ejs` syntax. If you need full `ejs` syntax support, you can use `html-webpack-plugin` directly.
:::

## Usage

The plugin will generate an HTML file for you that includes all your JS outputs in the head using `<script>` tags.
Expand Down
4 changes: 4 additions & 0 deletions website/docs/zh/plugins/rspack/html-rspack-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ new rspack.HtmlRspackPlugin(options);

如果它提供的配置项无法满足你的需求,你也可以直接使用社区的 [html-webpack-plugin](https://www.npmjs.com/package/html-webpack-plugin) 插件。

:::warning
`rspack.HtmlRspackPlugin` 不支持完整的 `ejs` 语法, 仅支持 `ejs` 语法的一个子集,如果对完整的 `ejs` 语法支持有需求,可以直接使用 `html-webpack-plugin`。
:::

## 用法

这个插件会为你生成一个 HTML 文件,该文件的 head 包含了所有 JS 产物对应的 `<script>` 标签。
Expand Down
Loading