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
3 changes: 3 additions & 0 deletions .changeset/mighty-buckets-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

---
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Thanks to:
- [Preact](https://preactjs.com/) for creating a lightweight and efficient UI library that served as a foundation for the ReactLynx project.
- [React](https://react.dev/) for creating a comprehensive and intuitive library for building user interfaces that inspires the programming model of Lynx.
- [React Native](https://reactnative.dev/) for groundbreaking work in allowing developers to create truly native apps using JavaScript and React.
- [Rspack](https://rspack.dev/) for providing a fast and flexible build tool that has significantly enhanced the build performance of Lynx projects.
- [Rspack](https://rspack.rs/) for providing a fast and flexible build tool that has significantly enhanced the build performance of Lynx projects.
- [React Native for Web](https://necolas.github.io/react-native-web/) project for inspiring the Lynx for Web project, motivating our architectural design with its accessible implementation and interoperability with React DOM.
- [SWC](https://github.com/swc-project/swc) project created by [@kdy1](https://github.com/kdy1), which turbocharges ReactLynx's code transformation with Rust-powered efficiency, achieving sub-second build times and frictionless developer experience.

Expand Down
4 changes: 2 additions & 2 deletions packages/rspeedy/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@

- Add `callerName` option to `createRspeedy`. ([#757](https://github.com/lynx-family/lynx-stack/pull/757))

It can be accessed by Rsbuild plugins through [`api.context.callerName`](https://rsbuild.dev/api/javascript-api/instance#contextcallername), and execute different logic based on this identifier.
It can be accessed by Rsbuild plugins through [`api.context.callerName`](https://rsbuild.rs/api/javascript-api/instance#contextcallername), and execute different logic based on this identifier.

```js
export const myPlugin = {
Expand Down Expand Up @@ -652,7 +652,7 @@

- Support `output.distPath.*`. ([#366](https://github.com/lynx-family/lynx-stack/pull/366))

See [Rsbuild - distPath](https://rsbuild.dev/config/output/dist-path) for all available options.
See [Rsbuild - distPath](https://rsbuild.rs/config/output/dist-path) for all available options.

- Support `performance.printFileSize` ([#336](https://github.com/lynx-family/lynx-stack/pull/336))

Expand Down
2 changes: 1 addition & 1 deletion packages/rspeedy/core/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { logger } from '@rsbuild/core'
import type { Config } from './config/index.js'

/**
* The exposed API of Rspeedy. Can be used in Rsbuild plugin with {@link https://rsbuild.dev/plugins/dev/core#apiuseexposed | api.useExposed}.
* The exposed API of Rspeedy. Can be used in Rsbuild plugin with {@link https://rsbuild.rs/plugins/dev/core#apiuseexposed | api.useExposed}.
*
* @public
*
Expand Down
2 changes: 1 addition & 1 deletion packages/rspeedy/core/src/config/dev/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface Dev {
*
* During `rspeedy dev`, if this option is not set to `false`, the dev plugin normalizes it to `http://<detected-host>:<port>/` and appends `server.base` when configured.
*
* The functionality of {@link Dev.assetPrefix} is basically the same as the {@link https://www.rspack.dev/config/output#outputpublicpath | output.publicPath}
* The functionality of {@link Dev.assetPrefix} is basically the same as the {@link https://rspack.rs/config/output#outputpublicpath | output.publicPath}
* config in Rspack. With the following differences:
*
* - `dev.assetPrefix` only takes effect during development.
Expand Down
6 changes: 3 additions & 3 deletions packages/rspeedy/core/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export interface Config {
*
* If the value of `mode` is `'development'`:
*
* - Enable HMR and register the {@link https://rspack.dev/plugins/webpack/hot-module-replacement-plugin | HotModuleReplacementPlugin}.
* - Enable HMR and register the {@link https://rspack.rs/plugins/webpack/hot-module-replacement-plugin | HotModuleReplacementPlugin}.
*
* - Generate JavaScript source maps, but do not generate CSS source maps. See {@link Output.sourceMap} for details.
*
Expand All @@ -97,7 +97,7 @@ export interface Config {
*
* If the value of `mode` is `'production'`:
*
* - Enable JavaScript code minification and register the {@link https://rspack.dev/plugins/rspack/swc-js-minimizer-rspack-plugin | SwcJsMinimizerRspackPlugin}.
* - Enable JavaScript code minification and register the {@link https://rspack.rs/plugins/rspack/swc-js-minimizer-rspack-plugin | SwcJsMinimizerRspackPlugin}.
*
* - Generated JavaScript and CSS filenames will have hash suffixes, see {@link Output.filenameHash}.
*
Expand Down Expand Up @@ -165,7 +165,7 @@ export interface Config {
* @defaultValue undefined
*
* @remarks
* Rspeedy use the plugin APIs from {@link https://rsbuild.dev/plugins/dev/index | Rsbuild}. See the corresponding document for developing a plugin.
* Rspeedy uses the plugin APIs from {@link https://rsbuild.rs/plugins/dev/index | Rsbuild}. See the corresponding document for developing a plugin.
*/
plugins?: RsbuildPlugins | undefined
}
2 changes: 1 addition & 1 deletion packages/rspeedy/core/src/config/mergeRspeedyConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import type { Config } from './index.js'
*
* @remarks
*
* This is actually an alias of {@link https://rsbuild.dev/api/javascript-api/core#mergersbuildconfig | mergeRsbuildConfig}.
* This is actually an alias of {@link https://rsbuild.rs/api/javascript-api/core#mergersbuildconfig | mergeRsbuildConfig}.
*
* @public
*/
Expand Down
14 changes: 10 additions & 4 deletions packages/rspeedy/core/src/config/output/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface Output {
*
* @remarks
*
* The functionality of {@link Output.assetPrefix} is basically the same as the {@link https://www.rspack.dev/config/output#outputpublicpath | output.publicPath}
* The functionality of {@link Output.assetPrefix} is basically the same as the {@link https://rspack.rs/config/output#outputpublicpath | output.publicPath}
* config in Rspack. With the following differences:
*
* - `output.assetPrefix` only takes effect in the production build.
Expand All @@ -46,6 +46,12 @@ export interface Output {
/**
* The {@link Output.cleanDistPath} option determines whether all files in the output directory (default: `dist`) are removed before the build starts.
*
* @remarks
*
* 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 {@link https://rsbuild.rs/config/output/dist-path#root-directory | output.distPath.root} 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.
*
* @defaultValue Automatically enabled when `output.distPath.root` is a subdirectory of the project root; otherwise disabled.
*
* @example
Expand Down Expand Up @@ -82,7 +88,7 @@ export interface Output {
*
* @remarks
*
* For more options, see {@link https://rspack.dev/plugins/rspack/copy-rspack-plugin | Rspack.CopyRspackPlugin}.
* For more options, see {@link https://rspack.rs/plugins/rspack/copy-rspack-plugin | Rspack.CopyRspackPlugin}.
*
* @example
*
Expand Down Expand Up @@ -234,7 +240,7 @@ export interface Output {
*
* @remarks
*
* More options can be found at {@link https://rsbuild.dev/config/output/dist-path | Rsbuild - distPath}.
* More options can be found at {@link https://rsbuild.rs/config/output/dist-path | Rsbuild - distPath}.
*
* @example
*
Expand Down Expand Up @@ -329,7 +335,7 @@ export interface Output {
*
* @remarks
*
* This is different with {@link https://rsbuild.dev/config/output/inline-scripts | output.inlineScripts } since we normally want to inline scripts in Lynx bundle (`.lynx.bundle`).
* This is different with {@link https://rsbuild.rs/config/output/inline-scripts | output.inlineScripts } since we normally want to inline scripts in Lynx bundle (`.lynx.bundle`).
*
* There are two points that need to be especially noted:
*
Expand Down
2 changes: 1 addition & 1 deletion packages/rspeedy/core/src/config/output/minify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export interface Minify {
*
* @remarks
*
* For detailed configurations, please refer to {@link https://rspack.dev/plugins/rspack/swc-js-minimizer-rspack-plugin | SwcJsMinimizerRspackPlugin}.
* For detailed configurations, please refer to {@link https://rspack.rs/plugins/rspack/swc-js-minimizer-rspack-plugin | SwcJsMinimizerRspackPlugin}.
*
* @example
*
Expand Down
2 changes: 1 addition & 1 deletion packages/rspeedy/core/src/config/output/source-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface SourceMap {
*
* @remarks
*
* See {@link https://rspack.dev/config/devtool | Rspack - Devtool} for details.
* See {@link https://rspack.rs/config/devtool | Rspack - Devtool} for details.
*
* @example
*
Expand Down
4 changes: 2 additions & 2 deletions packages/rspeedy/core/src/config/performance/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export interface Performance {
chunkSplit?: ChunkSplit | ChunkSplitBySize | ChunkSplitCustom | undefined

/**
* Whether capture timing information in the build time and the runtime, the same as the {@link https://rspack.dev/config/other-options#profile | profile} config of Rspack.
* Whether capture timing information in the build time and the runtime, the same as the {@link https://rspack.rs/config/other-options#profile | profile} config of Rspack.
*
* @defaultValue Rspeedy sets this to `true` when `DEBUG` contains `rspeedy`; otherwise it leaves the option unset.
*
Expand Down Expand Up @@ -146,7 +146,7 @@ export interface Performance {
*
* {@link Performance.printFileSize}
*
* See {@link https://rsbuild.dev/config/performance/print-file-size | Rsbuild - performance.printFileSize} for details.
* See {@link https://rsbuild.rs/config/performance/print-file-size | Rsbuild - performance.printFileSize} for details.
*
* @example
*
Expand Down
2 changes: 1 addition & 1 deletion packages/rspeedy/core/src/config/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface Server {
*
* If you want to access lynx bundle through `http://<host>:<port>/foo/main.lynx.bundle`, you can change `server.base` to `/foo`
*
* you can refer to {@link https://rsbuild.dev/config/server/base | server.base } for more information.
* you can refer to {@link https://rsbuild.rs/config/server/base | server.base } for more information.
*
* @example
*
Expand Down
2 changes: 1 addition & 1 deletion packages/rspeedy/core/src/config/source/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* The `EntryDescription` describes a entry. It is useful when the project has multiple entries with different configuration.
*
* @remarks
* It is similar with the {@link https://www.rspack.dev/config/entry#entry-description-object | Entry Description Object} of Rspack.
* It is similar with the {@link https://rspack.rs/config/entry#entry-description-object | Entry Description Object} of Rspack.
* But only a few properties that Lynx supports is allowed.
*
* @public
Expand Down
8 changes: 4 additions & 4 deletions packages/rspeedy/core/src/config/source/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface Source {
* Through the source.assetsInclude config, you can specify additional file types that should be treated as static assets.
* These added static assets are processed using the same rules as the built-in supported static assets。
*
* The usage of `source.assetsInclude` is consistent with {@link https://rspack.dev/config/module#condition | Condition}
* The usage of `source.assetsInclude` is consistent with {@link https://rspack.rs/config/module#condition | Condition}
* in Rspack, which supports passing in strings, regular expressions, arrays of conditions, or logical conditions
* to match the module path or assets.
*
Expand Down Expand Up @@ -237,7 +237,7 @@ export interface Source {
* By default, Rsbuild compiles JavaScript files in the current directory and TypeScript/JSX files
* in all directories. Through the `source.exclude` config, you can specify files or directories
* that should be excluded from compilation.
* The usage of `source.exclude` is consistent with {@link https://rspack.dev/config/module#ruleexclude | Rule.exclude}
* The usage of `source.exclude` is consistent with {@link https://rspack.rs/config/module#ruleexclude | Rule.exclude}
* in Rspack, which supports passing in strings or regular expressions to match module paths.
*
* @example
Expand Down Expand Up @@ -304,7 +304,7 @@ export interface Source {
*
* Through the `source.include` config, you can specify directories or modules
* that need to be compiled by Rsbuild.
* The usage of `source.include` is consistent with {@link https://rspack.dev/config/module#ruleinclude | Rule.include}
* The usage of `source.include` is consistent with {@link https://rspack.rs/config/module#ruleinclude | Rule.include}
* in Rspack, which supports passing in strings or regular expressions to match the module path.
*
* @example
Expand Down Expand Up @@ -377,7 +377,7 @@ export interface Source {
*
* @remarks
*
* See {@link https://rsbuild.dev/config/source/pre-entry | source.preEntry} for more details.
* See {@link https://rsbuild.rs/config/source/pre-entry | source.preEntry} for more details.
*
* @example
*
Expand Down
16 changes: 8 additions & 8 deletions packages/rspeedy/core/src/config/tools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type RsdoctorRspackPluginOptions = ConstructorParameters<
*/
export interface Tools {
/**
* The {@link Tools.bundlerChain} changes the options of {@link https://www.rspack.dev | Rspack} using {@link https://github.com/rspack-contrib/rspack-chain | rspack-chain}.
* The {@link Tools.bundlerChain} changes the options of {@link https://rspack.rs | Rspack} using {@link https://github.com/rspack-contrib/rspack-chain | rspack-chain}.
*
* @defaultValue undefined
*
Expand Down Expand Up @@ -66,7 +66,7 @@ export interface Tools {
cssLoader?: CssLoader | undefined

/**
* The {@link CssExtract} controls the options of {@link https://www.rspack.dev/plugins/rspack/css-extract-rspack-plugin | CssExtractRspackPlugin}
* The {@link CssExtract} controls the options of {@link https://rspack.rs/plugins/rspack/css-extract-rspack-plugin | CssExtractRspackPlugin}
*
* @defaultValue undefined
*/
Expand Down Expand Up @@ -101,7 +101,7 @@ export interface Tools {
rsdoctor?: RsdoctorRspackPluginOptions | undefined

/**
* The {@link Tools.rspack} controls the options of {@link https://www.rspack.dev/ | Rspack}.
* The {@link Tools.rspack} controls the options of {@link https://rspack.rs/ | Rspack}.
*
* @defaultValue undefined
*
Expand All @@ -123,7 +123,7 @@ export interface Tools {
* })
* ```
*
* See {@link https://www.rspack.dev/config/index | Rspack - Configuration} for details.
* See {@link https://rspack.rs/config/index | Rspack - Configuration} for details.
*
* @example
*
Expand All @@ -144,7 +144,7 @@ export interface Tools {
* })
* ```
*
* See {@link https://rsbuild.dev/config/tools/rspack#env | Rsbuild - tools.rspack} for details.
* See {@link https://rsbuild.rs/config/tools/rspack#env | Rsbuild - tools.rspack} for details.
*
* @example
*
Expand All @@ -166,7 +166,7 @@ export interface Tools {
* })
* ```
*
* See {@link https://rsbuild.dev/config/tools/rspack#mergeconfig | Rsbuild - tools.rspack} for details.
* See {@link https://rsbuild.rs/config/tools/rspack#mergeconfig | Rsbuild - tools.rspack} for details.
*
* @example
*
Expand All @@ -185,12 +185,12 @@ export interface Tools {
* })
* ```
*
* See {@link https://rsbuild.dev/config/tools/rspack#appendplugins | Rsbuild - tools.rspack} for details.
* See {@link https://rsbuild.rs/config/tools/rspack#appendplugins | Rsbuild - tools.rspack} for details.
*/
rspack?: ToolsConfig['rspack'] | undefined

/**
* The {@link Tools.swc} controls the options of {@link https://rspack.dev/guide/features/builtin-swc-loader | builtin:swc-loader}.
* The {@link Tools.swc} controls the options of {@link https://rspack.rs/guide/features/builtin-swc-loader | builtin:swc-loader}.
*
* @defaultValue undefined
*/
Expand Down
6 changes: 3 additions & 3 deletions packages/rspeedy/core/src/create-rspeedy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ export interface CreateRspeedyOptions {
*/
rspeedyConfig?: Config
/**
* Rspeedy automatically loads the .env file by default, utilizing the [Rsbuild API](https://rsbuild.dev/api/javascript-api/core#load-env-variables).
* Rspeedy automatically loads the .env file by default, utilizing the [Rsbuild API](https://rsbuild.rs/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`.
* @see https://rsbuild.dev/guide/advanced/env-vars#env-file
* @see https://rsbuild.rs/guide/advanced/env-vars#env-file
* @defaultValue true
*/
loadEnv?: CreateRsbuildOptions['loadEnv']
/**
* Only build specified environments.
* For example, passing `['lynx']` will only build the `lynx` environment.
* If not specified or passing an empty array, all environments will be built.
* @see https://rsbuild.dev/guide/advanced/environments#build-specified-environment
* @see https://rsbuild.rs/guide/advanced/environments#build-specified-environment
* @defaultValue []
*/
environment?: CreateRsbuildOptions['environment']
Expand Down
2 changes: 1 addition & 1 deletion packages/rspeedy/core/src/plugins/optimization.plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function pluginOptimization(): RsbuildPlugin {

if (isProd) {
// Avoid entry being wrapped by IIFE
// See: https://rspack.dev/config/optimization#optimizationavoidentryiife
// See: https://rspack.rs/config/optimization#optimizationavoidentryiife
chain
.optimization
.avoidEntryIife(true)
Expand Down
2 changes: 1 addition & 1 deletion packages/rspeedy/plugin-react/src/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function applyCSS(
// - disables `style-loader`
// - enables CssExtractRspackPlugin
// - disables `experiment.css`(which is all we need)
// See: https://rsbuild.dev/config/output/inject-styles
// See: https://rsbuild.rs/config/output/inject-styles
output: { injectStyles: false },
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const require = createRequire(import.meta.url);
* @public
*
* CssExtractRspackPlugin is the CSS extract plugin for Lynx.
* It works just like the {@link https://www.rspack.dev/plugins/rspack/css-extract-rspack-plugin.html | CssExtractRspackPlugin} in Web.
* It works just like the {@link https://rspack.rs/plugins/rspack/css-extract-rspack-plugin.html | CssExtractRspackPlugin} in Web.
*
* @example
* ```js
Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/guide/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,4 @@ import myFile from './static/myFile.pdf';
console.log(myFile); // "/static/myFile.6c12aba3.pdf"
```

For more information about asset modules, please refer to [Rspack - Asset modules](https://rspack.dev/guide/features/asset-module).
For more information about asset modules, please refer to [Rspack - Asset modules](https://rspack.rs/guide/features/asset-module).
2 changes: 1 addition & 1 deletion website/docs/en/guide/build-profiling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Rspeedy supports the use of the `RSPACK_PROFILE` environment variable for Rspack

This command will generate a `.rspack-profile-${timestamp}-${pid}` folder in the current directory, containing a `trace.json` file, which is generated by Rspack based on tracing and records the time spent on each phase at a granular level, and can be viewed using [ui.perfetto.dev](https://ui.perfetto.dev/).

> For more information about Rspack build performance analysis usage, please refer to [Rspack - Tracing](https://rspack.dev/contribute/development/tracing).
> For more information about Rspack build performance analysis usage, please refer to [Rspack - Tracing](https://rspack.rs/contribute/development/tracing).

## Node.js Profiling

Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/guide/code-splitting.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Code Splitting is an experimental feature in Rspeedy.

> Rspack supports code splitting, which allows splitting the code into other chunks. You have the full control about size and number of generated assets, which allow you to gain performance improvements in loading time.
>
> [Rspack - Code Splitting](https://rspack.dev/guide/optimization/code-splitting)
> [Rspack - Code Splitting](https://rspack.rs/guide/optimization/code-splitting)

## Lazy-loading components

Expand Down
6 changes: 3 additions & 3 deletions website/docs/en/guide/css.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export default defineConfig({
})
```

More options can be used in `pluginSass`, please refer to [Sass Plugin](https://rsbuild.dev/plugins/list/plugin-sass) for usage.
More options can be used in `pluginSass`, please refer to [Sass Plugin](https://rsbuild.rs/plugins/list/plugin-sass) for usage.

### Using `less`

Expand Down Expand Up @@ -307,7 +307,7 @@ export default defineConfig({
})
```

More options can be used in `pluginLess`, please refer to [Less Plugin](https://rsbuild.dev/plugins/list/plugin-less) for usage.
More options can be used in `pluginLess`, please refer to [Less Plugin](https://rsbuild.rs/plugins/list/plugin-less) for usage.

### Using `stylus`

Expand All @@ -334,7 +334,7 @@ export default defineConfig({
})
```

More options can be used in `pluginStylus`, please refer to [Stylus Plugin](https://rsbuild.dev/plugins/list/plugin-stylus) for usage.
More options can be used in `pluginStylus`, please refer to [Stylus Plugin](https://rsbuild.rs/plugins/list/plugin-stylus) for usage.

## Using Lynx Scoped CSS

Expand Down
Loading
Loading