diff --git a/website/components/builtIns/Table.tsx b/website/components/builtIns/Table.tsx index 3a81407bfd7..23d80ff4b59 100644 --- a/website/components/builtIns/Table.tsx +++ b/website/components/builtIns/Table.tsx @@ -10,7 +10,11 @@ import { interface TableProps { children?: ReactNode[]; body?: any[]; - header?: { name: string | JSX.Element; key: string; style: React.CSSProperties }[]; + header?: { + name: string | JSX.Element; + key: string; + style: React.CSSProperties; + }[]; tableStyle?: Record; } diff --git a/website/docs/en/plugins/webpack/entry-plugin.mdx b/website/docs/en/plugins/webpack/entry-plugin.mdx index fb04893440a..769d4171fb9 100644 --- a/website/docs/en/plugins/webpack/entry-plugin.mdx +++ b/website/docs/en/plugins/webpack/entry-plugin.mdx @@ -29,6 +29,7 @@ The request path for the entry module. To adjust settings related to the entry module. - **Type:** + ```ts type EntryOptions = { name?: string; diff --git a/website/docs/en/plugins/webpack/index.mdx b/website/docs/en/plugins/webpack/index.mdx index a9de7d56fd6..20083266053 100644 --- a/website/docs/en/plugins/webpack/index.mdx +++ b/website/docs/en/plugins/webpack/index.mdx @@ -14,8 +14,8 @@ The table below shows the support status of Rspack for the built-in plugins in W name: 'Support Status', key: 'status', style: { - width: '200px' - } + width: '200px', + }, }, { name: 'Notes', @@ -60,7 +60,8 @@ The table below shows the support status of Rspack for the built-in plugins in W { name: 'EvalSourceMapDevToolPlugin', status: '🟡 Partially Supported', - notes: '`test`, `include`, `exclude`, `moduleFilenameTemplate`, `protocol` options not supported', + notes: + '`test`, `include`, `exclude`, `moduleFilenameTemplate`, `protocol` options not supported', }, { name: 'HashedModuleIdsPlugin', diff --git a/website/docs/en/plugins/webpack/provide-plugin.mdx b/website/docs/en/plugins/webpack/provide-plugin.mdx index f5965cbe8b7..fc71fb7b7a8 100644 --- a/website/docs/en/plugins/webpack/provide-plugin.mdx +++ b/website/docs/en/plugins/webpack/provide-plugin.mdx @@ -55,7 +55,7 @@ Enable `process` object support within a browser context. ```js new rspack.ProvidePlugin({ process: [require.resolve('process/browser')], -}) +}); ``` the piece of code: diff --git a/website/docs/zh/plugins/webpack/define-plugin.mdx b/website/docs/zh/plugins/webpack/define-plugin.mdx index 61dc25ce0bf..1bce6d6529d 100644 --- a/website/docs/zh/plugins/webpack/define-plugin.mdx +++ b/website/docs/zh/plugins/webpack/define-plugin.mdx @@ -53,7 +53,7 @@ if (!BROWSER_SUPPORTS_HTML5) require('html5shiv'); ::: :::tip 提示 -请注意,由于插件直接执行文本替换,因此提供给它的值必须包含字符串内部的实际引号。通常,这是通过使用交替引号,如 `'"production"'`,或使用 `JSON.stringify('production')` 来完成。 +请注意,由于插件直接执行文本替换,因此提供给它的值必须包含字符串内部的实际引号。通常,这是通过使用交替引号,如 `'"production"'`,或使用 `JSON.stringify('production')` 来完成。 ::: ```js @@ -103,4 +103,3 @@ new rspack.DefinePlugin({ SERVICE_URL: JSON.stringify('https://dev.example.com'), }); ``` - diff --git a/website/docs/zh/plugins/webpack/entry-plugin.mdx b/website/docs/zh/plugins/webpack/entry-plugin.mdx index 1d41dbf9e68..aea8288e1a4 100644 --- a/website/docs/zh/plugins/webpack/entry-plugin.mdx +++ b/website/docs/zh/plugins/webpack/entry-plugin.mdx @@ -29,6 +29,7 @@ new rspack.EntryPlugin(context, entry, options); 调整入口模块的相关设置。 - **类型:** + ```ts type EntryOptions = { name?: string; diff --git a/website/docs/zh/plugins/webpack/index.mdx b/website/docs/zh/plugins/webpack/index.mdx index 275b939c026..43f4969e2a2 100644 --- a/website/docs/zh/plugins/webpack/index.mdx +++ b/website/docs/zh/plugins/webpack/index.mdx @@ -137,5 +137,6 @@ import { Table } from '@builtIns'; status: '🔴 不支持', notes: '待实现', }, - ]} + +]} /> diff --git a/website/docs/zh/plugins/webpack/provide-plugin.mdx b/website/docs/zh/plugins/webpack/provide-plugin.mdx index f1b73b32c29..26d2f3ba78e 100644 --- a/website/docs/zh/plugins/webpack/provide-plugin.mdx +++ b/website/docs/zh/plugins/webpack/provide-plugin.mdx @@ -55,7 +55,7 @@ new rspack.ProvidePlugin({ ```js new rspack.ProvidePlugin({ process: [require.resolve('process/browser')], -}) +}); ``` 以下代码片段: diff --git a/website/docs/zh/plugins/webpack/source-map-dev-tool-plugin.mdx b/website/docs/zh/plugins/webpack/source-map-dev-tool-plugin.mdx index 0a51dd65f95..74957c981f3 100644 --- a/website/docs/zh/plugins/webpack/source-map-dev-tool-plugin.mdx +++ b/website/docs/zh/plugins/webpack/source-map-dev-tool-plugin.mdx @@ -31,11 +31,11 @@ new rspack.SourceMapDevToolPlugin(options); `fileContext` 选项在你希望将 source map 存储在上级目录以避免绝对 `[url]` 中出现 `../../` 时非常有用。 -:::tip 提示 +:::tip 提示 将 `module` 或 `columns` 设置为 `false` 将生成不太准确的 source map,但同时也能显著提高编译性能。 ::: -:::tip 提示 +:::tip 提示 如果你想要在[开发模式](/config/mode#development)中为这个插件使用自定义配置,请确保禁用默认配置。即设置 `devtool: false`。 :::