Skip to content
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
56 changes: 21 additions & 35 deletions api-reports/rspeedy.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
}
]
},
{
"text": "progressBar",
"link": "api/rspeedy/rspeedy.dev.progressbar",
"collapsed": true,
"collapsible": false,
"items": []
},
{
"text": "watchFiles",
"link": "api/rspeedy/rspeedy.dev.watchfiles",
Expand Down Expand Up @@ -129,47 +136,12 @@
"collapsed": true,
"collapsible": true,
"items": [
{
"text": "css",
"link": "api/rspeedy/rspeedy.distpath.css",
"collapsed": true,
"collapsible": false,
"items": []
},
{
"text": "cssAsync",
"link": "api/rspeedy/rspeedy.distpath.cssasync",
"collapsed": true,
"collapsible": false,
"items": []
},
{
"text": "intermediate",
"link": "api/rspeedy/rspeedy.distpath.intermediate",
"collapsed": true,
"collapsible": false,
"items": []
},
{
"text": "js",
"link": "api/rspeedy/rspeedy.distpath.js",
"collapsed": true,
"collapsible": false,
"items": []
},
{
"text": "jsAsync",
"link": "api/rspeedy/rspeedy.distpath.jsasync",
"collapsed": true,
"collapsible": false,
"items": []
},
{
"text": "root",
"link": "api/rspeedy/rspeedy.distpath.root",
"collapsed": true,
"collapsible": false,
"items": []
}
]
},
Expand Down Expand Up @@ -346,6 +318,13 @@
}
]
},
{
"text": "printFileSize",
"link": "api/rspeedy/rspeedy.performance.printfilesize",
"collapsed": true,
"collapsible": false,
"items": []
},
{
"text": "removeConsole",
"link": "api/rspeedy/rspeedy.performance.removeconsole",
Expand Down Expand Up @@ -388,6 +367,13 @@
"collapsed": true,
"collapsible": false,
"items": []
},
{
"text": "strictPort",
"link": "api/rspeedy/rspeedy.server.strictport",
"collapsed": true,
"collapsible": false,
"items": []
}
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lynx-js/react-rsbuild-plugin](./react-rsbuild-plugin.md) &gt; [PluginReactLynxOptions](./react-rsbuild-plugin.pluginreactlynxoptions.md) &gt; [extractStr](./react-rsbuild-plugin.pluginreactlynxoptions.extractstr.md)

## PluginReactLynxOptions.extractStr property

Merge same string literals in JS and Lepus to reduce output bundle size. Set to `false` to disable.

**Signature:**

```typescript
extractStr?: Partial<ExtractStrConfig> | boolean;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Options of [pluginReactLynx()](./react-rsbuild-plugin.pluginreactlynx.md)
**Signature:**

```typescript
export interface PluginReactLynxOptions
export interface PluginReactLynxOptions
```

## Properties
Expand All @@ -32,6 +32,7 @@ export interface PluginReactLynxOptions
| [enableSSR?](./react-rsbuild-plugin.pluginreactlynxoptions.enablessr.md) | | boolean | _(Optional)_ <code>enableSSR</code> enable Lynx SSR feature for this build. |
| [engineVersion?](./react-rsbuild-plugin.pluginreactlynxoptions.engineversion.md) | | string | _(Optional)_ <code>engineVersion</code> specifies the minimum Lynx Engine version required for an App bundle to function properly. |
| [experimental\_isLazyBundle?](./react-rsbuild-plugin.pluginreactlynxoptions.experimental_islazybundle.md) | | boolean | **_(ALPHA)_** _(Optional)_ Generate standalone lazy bundle. |
| [extractStr?](./react-rsbuild-plugin.pluginreactlynxoptions.extractstr.md) | | Partial&lt;ExtractStrConfig<!-- -->&gt; \| boolean | _(Optional)_ Merge same string literals in JS and Lepus to reduce output bundle size. Set to <code>false</code> to disable. |
| [firstScreenSyncTiming?](./react-rsbuild-plugin.pluginreactlynxoptions.firstscreensynctiming.md) | | 'immediately' \| 'jsReady' | <p>_(Optional)_ This flag controls when MainThread (Lepus) transfers control to Background after the first screen</p><p>This flag has two options:</p><p><code>&quot;immediately&quot;</code>: Transfer immediately</p><p><code>&quot;jsReady&quot;</code>: Transfer when background (JS Runtime) is ready</p><p>After handing over control, MainThread (Lepus) runtime can no longer respond to data updates, and data updates will be forwarded to background (JS Runtime) and processed \_\_asynchronously\_\_</p> |
| [jsx?](./react-rsbuild-plugin.pluginreactlynxoptions.jsx.md) | | Partial&lt;JsxTransformerConfig&gt; \| undefined | _(Optional)_ The <code>jsx</code> option controls how JSX is transformed. |
| [pipelineSchedulerConfig?](./react-rsbuild-plugin.pluginreactlynxoptions.pipelineschedulerconfig.md) | | number | _(Optional)_ Composite configuration representing pipeline scheduling strategies, including [PluginReactLynxOptions.enableParallelElement](./react-rsbuild-plugin.pluginreactlynxoptions.enableparallelelement.md) and list batch-rendering. All newly introduced scheduling strategies will be managed by this uint64 configuration. |
Expand Down
4 changes: 2 additions & 2 deletions docs/en/api/rspeedy/rspeedy.createrspeedy.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ The `createRspeedy` method can let you create a Rspeedy instance and you can cus
**Signature:**

```typescript
export declare function createRspeedy({ cwd, rspeedyConfig }: CreateRspeedyOptions): Promise<RspeedyInstance>;
export declare function createRspeedy({ cwd, rspeedyConfig, loadEnv }: CreateRspeedyOptions): Promise<RspeedyInstance>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| { cwd, rspeedyConfig } | [CreateRspeedyOptions](./rspeedy.createrspeedyoptions.md) | |
| { cwd, rspeedyConfig, loadEnv } | [CreateRspeedyOptions](./rspeedy.createrspeedyoptions.md) | |

**Returns:**

Expand Down
13 changes: 13 additions & 0 deletions docs/en/api/rspeedy/rspeedy.createrspeedyoptions.loadenv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lynx-js/rspeedy](./rspeedy.md) &gt; [CreateRspeedyOptions](./rspeedy.createrspeedyoptions.md) &gt; [loadEnv](./rspeedy.createrspeedyoptions.loadenv.md)

## CreateRspeedyOptions.loadEnv property

Rspeedy automatically loads the .env file by default, utilizing the \[Rsbuild API\](https://rsbuild.dev/api/javascript-api/core\#load-env-variables). You can use the environment variables defined in the .env file within your code by accessing them via `import.meta.env.FOO` or `process.env.Foo`<!-- -->.

**Signature:**

```typescript
loadEnv?: CreateRsbuildOptions['loadEnv'];
```
1 change: 1 addition & 0 deletions docs/en/api/rspeedy/rspeedy.createrspeedyoptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ export interface CreateRspeedyOptions
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [cwd?](./rspeedy.createrspeedyoptions.cwd.md) | | string | _(Optional)_ The root path of the current build. |
| [loadEnv?](./rspeedy.createrspeedyoptions.loadenv.md) | | CreateRsbuildOptions\['loadEnv'\] | _(Optional)_ Rspeedy automatically loads the .env file by default, utilizing the \[Rsbuild API\](https://rsbuild.dev/api/javascript-api/core\#load-env-variables). You can use the environment variables defined in the .env file within your code by accessing them via <code>import.meta.env.FOO</code> or <code>process.env.Foo</code>. |
| [rspeedyConfig?](./rspeedy.createrspeedyoptions.rspeedyconfig.md) | | [Config](./rspeedy.config.md) | _(Optional)_ The config of Rspeedy. |

1 change: 1 addition & 0 deletions docs/en/api/rspeedy/rspeedy.dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface Dev
| --- | --- | --- | --- |
| [assetPrefix?](./rspeedy.dev.assetprefix.md) | | string \| boolean \| undefined | _(Optional)_ The [Dev.assetPrefix](./rspeedy.dev.assetprefix.md) is used to set the URL prefix for static assets during development. |
| [client?](./rspeedy.dev.client.md) | | [Client](./rspeedy.devclient.md) \| undefined | _(Optional)_ Configuration of the development client. |
| [progressBar?](./rspeedy.dev.progressbar.md) | | boolean \| { id?: string; } \| undefined | <p>_(Optional)_ Whether to display progress bar during compilation.</p><p>Defaults to <code>true</code>.</p> |
| [watchFiles?](./rspeedy.dev.watchfiles.md) | | WatchFiles \| WatchFiles\[\] \| undefined | _(Optional)_ Watch specified files and directories for changes. When a file change is detected, it can trigger a page reload or restart the dev server. |
| [writeToDisk?](./rspeedy.dev.writetodisk.md) | | boolean \| ((filename: string) =&gt; boolean) \| undefined | _(Optional)_ Used to control whether the build artifacts of the development environment are written to the disk. |

50 changes: 50 additions & 0 deletions docs/en/api/rspeedy/rspeedy.dev.progressbar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lynx-js/rspeedy](./rspeedy.md) &gt; [Dev](./rspeedy.dev.md) &gt; [progressBar](./rspeedy.dev.progressbar.md)

## Dev.progressBar property

Whether to display progress bar during compilation.

Defaults to `true`<!-- -->.

**Signature:**

```typescript
progressBar?: boolean | {
id?: string;
} | undefined;
```

## Example 1

Disable the progress bar.

```js
import { defineConfig } from '@lynx-js/rspeedy'

export default defineConfig({
dev: {
progressBar: false,
},
})
```

## Example 2

Modify the progress bar `id`

To modify the text displayed on the left side of the progress bar, set the `id` option:

```js
import { defineConfig } from '@lynx-js/rspeedy'

export default defineConfig({
dev: {
progressBar: {
id: 'Some Text'
},
},
})
```

12 changes: 6 additions & 6 deletions docs/en/api/rspeedy/rspeedy.distpath.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ Set the directory of the dist files.
**Signature:**

```typescript
export interface DistPath
export interface DistPath extends DistPathConfig
```
**Extends:** DistPathConfig

## Remarks

More options can be found at [Rsbuild - distPath](https://rsbuild.dev/config/output/dist-path)<!-- -->.

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [css?](./rspeedy.distpath.css.md) | | string \| undefined | _(Optional)_ The output directory of CSS style files. |
| [cssAsync?](./rspeedy.distpath.cssasync.md) | | string \| undefined | _(Optional)_ The output directory of async JavaScript files. |
| [intermediate?](./rspeedy.distpath.intermediate.md) | | string \| undefined | _(Optional)_ The output directory of the intermediate files. |
| [js?](./rspeedy.distpath.js.md) | | string \| undefined | _(Optional)_ The output directory of JavaScript files. |
| [jsAsync?](./rspeedy.distpath.jsasync.md) | | string \| undefined | _(Optional)_ The output directory of async JavaScript files. |
| [root?](./rspeedy.distpath.root.md) | | string \| undefined | _(Optional)_ The root directory of all output files. |

2 changes: 1 addition & 1 deletion docs/en/api/rspeedy/rspeedy.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default defineConfig({

| Function | Description |
| --- | --- |
| [createRspeedy({ cwd, rspeedyConfig })](./rspeedy.createrspeedy.md) | The <code>createRspeedy</code> method can let you create a Rspeedy instance and you can customize the build or development process in Node.js Runtime. |
| [createRspeedy({ cwd, rspeedyConfig, loadEnv })](./rspeedy.createrspeedy.md) | The <code>createRspeedy</code> method can let you create a Rspeedy instance and you can customize the build or development process in Node.js Runtime. |
| [defineConfig(config)](./rspeedy.defineconfig.md) | The <code>defineConfig</code> method is a helper function used to get TypeScript intellisense. |
| [loadConfig(loadConfigOptions)](./rspeedy.loadconfig.md) | Load the build config by the config path. |
| [mergeRspeedyConfig(configs)](./rspeedy.mergerspeedyconfig.md) | Merge multiple Rspeedy configuration objects. |
Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/rspeedy/rspeedy.output.cleandistpath.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cleanDistPath?: boolean | undefined;

By default, if the output directory is a subdirectory of the project root path, Rspeedy will automatically clean all files in the build directory.

When [output.distPath.root](./rspeedy.distpath.root.md) is an external directory or the same as the project root directory, `cleanDistPath` is not enabled by default to prevent accidental deletion of files from other directories.
When [output.distPath.root](https://rsbuild.dev/config/output/dist-path#root-directory) is an external directory or the same as the project root directory, `cleanDistPath` is not enabled by default to prevent accidental deletion of files from other directories.

## Example 1

Expand Down
4 changes: 4 additions & 0 deletions docs/en/api/rspeedy/rspeedy.output.distpath.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Set the directory of the dist files.
distPath?: DistPath | undefined;
```

## Remarks

More options can be found at [Rsbuild - distPath](https://rsbuild.dev/config/output/dist-path)<!-- -->.

## Example

Use `output` instead of `dist`<!-- -->(the default value):
Expand Down
1 change: 1 addition & 0 deletions docs/en/api/rspeedy/rspeedy.performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ export interface Performance
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [chunkSplit?](./rspeedy.performance.chunksplit.md) | | [ChunkSplit](./rspeedy.chunksplit.md) \| [ChunkSplitBySize](./rspeedy.chunksplitbysize.md) \| [ChunkSplitCustom](./rspeedy.chunksplitcustom.md) \| undefined | _(Optional)_ [Performance.chunkSplit](./rspeedy.performance.chunksplit.md) is used to configure the chunk splitting strategy. |
| [printFileSize?](./rspeedy.performance.printfilesize.md) | | PerformanceConfig\['printFileSize'\] \| undefined | <p>_(Optional)_ Whether to print the file sizes after production build.</p><p>[Performance.printFileSize](./rspeedy.performance.printfilesize.md)</p><p>See [Rsbuild - performance.printFileSize](https://rsbuild.dev/config/performance/print-file-size) for details.</p> |
| [removeConsole?](./rspeedy.performance.removeconsole.md) | | boolean \| [ConsoleType](./rspeedy.consoletype.md)<!-- -->\[\] \| undefined | _(Optional)_ Whether to remove <code>console.[methodName]</code> in production build. |

Loading