Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
SyMind committed Apr 16, 2024
1 parent 2076043 commit 115e51e
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 11 deletions.
6 changes: 5 additions & 1 deletion website/components/builtIns/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string>;
}

Expand Down
1 change: 1 addition & 0 deletions website/docs/en/plugins/webpack/entry-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 4 additions & 3 deletions website/docs/en/plugins/webpack/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/plugins/webpack/provide-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions website/docs/zh/plugins/webpack/define-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if (!BROWSER_SUPPORTS_HTML5) require('html5shiv');
:::

:::tip 提示
请注意,由于插件直接执行文本替换,因此提供给它的值必须包含字符串内部的实际引号。通常,这是通过使用交替引号,如 `'"production"'`,或使用 `JSON.stringify('production')` 来完成。
请注意,由于插件直接执行文本替换,因此提供给它的值必须包含字符串内部的实际引号。通常,这是通过使用交替引号,如 `'"production"'`,或使用 `JSON.stringify('production')` 来完成。
:::

```js
Expand Down Expand Up @@ -103,4 +103,3 @@ new rspack.DefinePlugin({
SERVICE_URL: JSON.stringify('https://dev.example.com'),
});
```

1 change: 1 addition & 0 deletions website/docs/zh/plugins/webpack/entry-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ new rspack.EntryPlugin(context, entry, options);
调整入口模块的相关设置。

- **类型:**

```ts
type EntryOptions = {
name?: string;
Expand Down
3 changes: 2 additions & 1 deletion website/docs/zh/plugins/webpack/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,6 @@ import { Table } from '@builtIns';
status: '🔴 不支持',
notes: '待实现',
},
]}

]}
/>
2 changes: 1 addition & 1 deletion website/docs/zh/plugins/webpack/provide-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ new rspack.ProvidePlugin({
```js
new rspack.ProvidePlugin({
process: [require.resolve('process/browser')],
})
});
```

以下代码片段:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`
:::

Expand Down

0 comments on commit 115e51e

Please sign in to comment.