diff --git a/.changeset/mighty-buckets-train.md b/.changeset/mighty-buckets-train.md new file mode 100644 index 0000000000..853d812bb3 --- /dev/null +++ b/.changeset/mighty-buckets-train.md @@ -0,0 +1,3 @@ +--- + +--- diff --git a/README.md b/README.md index 4625931d00..faec15697e 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/packages/rspeedy/core/CHANGELOG.md b/packages/rspeedy/core/CHANGELOG.md index 29231f4faa..6bfa129584 100644 --- a/packages/rspeedy/core/CHANGELOG.md +++ b/packages/rspeedy/core/CHANGELOG.md @@ -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 = { @@ -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)) diff --git a/packages/rspeedy/core/src/api.ts b/packages/rspeedy/core/src/api.ts index 4361b53643..00a8e0f226 100644 --- a/packages/rspeedy/core/src/api.ts +++ b/packages/rspeedy/core/src/api.ts @@ -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 * diff --git a/packages/rspeedy/core/src/config/dev/index.ts b/packages/rspeedy/core/src/config/dev/index.ts index 3a66d238ff..c743e6bec2 100644 --- a/packages/rspeedy/core/src/config/dev/index.ts +++ b/packages/rspeedy/core/src/config/dev/index.ts @@ -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://:/` 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. diff --git a/packages/rspeedy/core/src/config/index.ts b/packages/rspeedy/core/src/config/index.ts index 764efd761f..ba644ea439 100644 --- a/packages/rspeedy/core/src/config/index.ts +++ b/packages/rspeedy/core/src/config/index.ts @@ -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. * @@ -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}. * @@ -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 } diff --git a/packages/rspeedy/core/src/config/mergeRspeedyConfig.ts b/packages/rspeedy/core/src/config/mergeRspeedyConfig.ts index c41c36bb28..11bf5d6fac 100644 --- a/packages/rspeedy/core/src/config/mergeRspeedyConfig.ts +++ b/packages/rspeedy/core/src/config/mergeRspeedyConfig.ts @@ -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 */ diff --git a/packages/rspeedy/core/src/config/output/index.ts b/packages/rspeedy/core/src/config/output/index.ts index eecbe3eb21..f8f17f1cfe 100644 --- a/packages/rspeedy/core/src/config/output/index.ts +++ b/packages/rspeedy/core/src/config/output/index.ts @@ -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. @@ -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 @@ -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 * @@ -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 * @@ -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: * diff --git a/packages/rspeedy/core/src/config/output/minify.ts b/packages/rspeedy/core/src/config/output/minify.ts index 9998a62293..f6338c5ea9 100644 --- a/packages/rspeedy/core/src/config/output/minify.ts +++ b/packages/rspeedy/core/src/config/output/minify.ts @@ -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 * diff --git a/packages/rspeedy/core/src/config/output/source-map.ts b/packages/rspeedy/core/src/config/output/source-map.ts index 033a423222..af796a3bf6 100644 --- a/packages/rspeedy/core/src/config/output/source-map.ts +++ b/packages/rspeedy/core/src/config/output/source-map.ts @@ -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 * diff --git a/packages/rspeedy/core/src/config/performance/index.ts b/packages/rspeedy/core/src/config/performance/index.ts index c5eff5312b..2f525e88ed 100644 --- a/packages/rspeedy/core/src/config/performance/index.ts +++ b/packages/rspeedy/core/src/config/performance/index.ts @@ -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. * @@ -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 * diff --git a/packages/rspeedy/core/src/config/server/index.ts b/packages/rspeedy/core/src/config/server/index.ts index 3b0e4b9d30..314dbf7e23 100644 --- a/packages/rspeedy/core/src/config/server/index.ts +++ b/packages/rspeedy/core/src/config/server/index.ts @@ -19,7 +19,7 @@ export interface Server { * * If you want to access lynx bundle through `http://:/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 * diff --git a/packages/rspeedy/core/src/config/source/entry.ts b/packages/rspeedy/core/src/config/source/entry.ts index de7215cd2e..9e67a8c3a7 100644 --- a/packages/rspeedy/core/src/config/source/entry.ts +++ b/packages/rspeedy/core/src/config/source/entry.ts @@ -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 diff --git a/packages/rspeedy/core/src/config/source/index.ts b/packages/rspeedy/core/src/config/source/index.ts index 5dd6c7590d..723255e47d 100644 --- a/packages/rspeedy/core/src/config/source/index.ts +++ b/packages/rspeedy/core/src/config/source/index.ts @@ -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. * @@ -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 @@ -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 @@ -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 * diff --git a/packages/rspeedy/core/src/config/tools/index.ts b/packages/rspeedy/core/src/config/tools/index.ts index 4146227750..ec3894617d 100644 --- a/packages/rspeedy/core/src/config/tools/index.ts +++ b/packages/rspeedy/core/src/config/tools/index.ts @@ -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 * @@ -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 */ @@ -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 * @@ -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 * @@ -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 * @@ -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 * @@ -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 */ diff --git a/packages/rspeedy/core/src/create-rspeedy.ts b/packages/rspeedy/core/src/create-rspeedy.ts index b41ea12fe6..5b0bd3fd57 100644 --- a/packages/rspeedy/core/src/create-rspeedy.ts +++ b/packages/rspeedy/core/src/create-rspeedy.ts @@ -41,9 +41,9 @@ 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'] @@ -51,7 +51,7 @@ export interface CreateRspeedyOptions { * 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'] diff --git a/packages/rspeedy/core/src/plugins/optimization.plugin.ts b/packages/rspeedy/core/src/plugins/optimization.plugin.ts index 8c55f6df27..62c47028ca 100644 --- a/packages/rspeedy/core/src/plugins/optimization.plugin.ts +++ b/packages/rspeedy/core/src/plugins/optimization.plugin.ts @@ -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) diff --git a/packages/rspeedy/plugin-react/src/css.ts b/packages/rspeedy/plugin-react/src/css.ts index 47955e8661..ed2daa94f7 100644 --- a/packages/rspeedy/plugin-react/src/css.ts +++ b/packages/rspeedy/plugin-react/src/css.ts @@ -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 }, }) }) diff --git a/packages/webpack/css-extract-webpack-plugin/src/CssExtractRspackPlugin.ts b/packages/webpack/css-extract-webpack-plugin/src/CssExtractRspackPlugin.ts index 93a7b1e096..b118a6ee50 100644 --- a/packages/webpack/css-extract-webpack-plugin/src/CssExtractRspackPlugin.ts +++ b/packages/webpack/css-extract-webpack-plugin/src/CssExtractRspackPlugin.ts @@ -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 diff --git a/website/docs/en/guide/assets.md b/website/docs/en/guide/assets.md index 1ad2b2840a..aa637c00e3 100644 --- a/website/docs/en/guide/assets.md +++ b/website/docs/en/guide/assets.md @@ -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). diff --git a/website/docs/en/guide/build-profiling.mdx b/website/docs/en/guide/build-profiling.mdx index 5cb8e7b2ef..f3790fd3bc 100644 --- a/website/docs/en/guide/build-profiling.mdx +++ b/website/docs/en/guide/build-profiling.mdx @@ -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 diff --git a/website/docs/en/guide/code-splitting.md b/website/docs/en/guide/code-splitting.md index e60de493d0..b89a628a7f 100644 --- a/website/docs/en/guide/code-splitting.md +++ b/website/docs/en/guide/code-splitting.md @@ -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 diff --git a/website/docs/en/guide/css.mdx b/website/docs/en/guide/css.mdx index 32bd076bd2..b5d8276778 100644 --- a/website/docs/en/guide/css.mdx +++ b/website/docs/en/guide/css.mdx @@ -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` @@ -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` @@ -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 diff --git a/website/docs/en/guide/i18n.mdx b/website/docs/en/guide/i18n.mdx index ec626c1ec4..bb6c14189f 100644 --- a/website/docs/en/guide/i18n.mdx +++ b/website/docs/en/guide/i18n.mdx @@ -119,7 +119,7 @@ export function App() { In a real world project, there are usually multiple resource files for different languages. Instead of static import them one-by-one, -you may use the [`import.meta.webpackContext`](https://rspack.dev/api/runtime-api/module-variables#importmetawebpackcontext) API of Rspack to statically import all the JSON files. +you may use the [`import.meta.webpackContext`](https://rspack.rs/api/runtime-api/module-variables#importmetawebpackcontext) API of Rspack to statically import all the JSON files. diff --git a/website/docs/en/guide/plugin.md b/website/docs/en/guide/plugin.md index 637912e135..685603741c 100644 --- a/website/docs/en/guide/plugin.md +++ b/website/docs/en/guide/plugin.md @@ -28,8 +28,8 @@ You can find the source code of all official plugins in [lynx-stack](https://git The following Rsbuild plugins can be used in Rspeedy. -- [Sass Plugin](https://rsbuild.dev/plugins/list/plugin-sass): Use Sass as the CSS preprocessor. -- [Less Plugin](https://rsbuild.dev/plugins/list/plugin-less): Use Less as the CSS preprocessor. +- [Sass Plugin](https://rsbuild.rs/plugins/list/plugin-sass): Use Sass as the CSS preprocessor. +- [Less Plugin](https://rsbuild.rs/plugins/list/plugin-less): Use Less as the CSS preprocessor. - [ESLint Plugin](https://github.com/rspack-contrib/rsbuild-plugin-eslint): Run ESLint checks during the compilation. - [Type Check Plugin](https://github.com/rspack-contrib/rsbuild-plugin-type-check): Run TypeScript type checker on a separate process. - [Image Compress Plugin](https://github.com/rspack-contrib/rsbuild-plugin-image-compress): Compress the image assets. @@ -54,14 +54,14 @@ If none of the existing ecosystem plugins meet your requirements, you might cons ### Rsbuild Plugin API -See [Rsbuild - Plugin Hooks](https://rsbuild.dev/plugins/dev/hooks) for more details. +See [Rsbuild - Plugin Hooks](https://rsbuild.rs/plugins/dev/hooks) for more details. ### Rspack Plugin API -See [Rspack - Compiler Hooks](https://rspack.dev/api/plugin-api/compiler-hooks) and [Rspack - Compilation Hooks](https://rspack.dev/api/plugin-api/compilation-hooks) for more details. +See [Rspack - Compiler Hooks](https://rspack.rs/api/plugin-api/compiler-hooks) and [Rspack - Compilation Hooks](https://rspack.rs/api/plugin-api/compilation-hooks) for more details. [`tools.rspack.plugins`]: /api/rspeedy.tools.rspack#example-4 -[BannerPlugin]: https://rspack.dev/plugins/webpack/banner-plugin -[DefinePlugin]: https://rspack.dev/plugins/webpack/define-plugin -[EnvironmentPlugin]: https://rspack.dev/plugins/webpack/environment-plugin -[ProvidePlugin]: https://rspack.dev/plugins/webpack/provide-plugin +[BannerPlugin]: https://rspack.rs/plugins/webpack/banner-plugin +[DefinePlugin]: https://rspack.rs/plugins/webpack/define-plugin +[EnvironmentPlugin]: https://rspack.rs/plugins/webpack/environment-plugin +[ProvidePlugin]: https://rspack.rs/plugins/webpack/provide-plugin diff --git a/website/docs/en/guide/resolve.md b/website/docs/en/guide/resolve.md index 24617135d3..21f91a2171 100644 --- a/website/docs/en/guide/resolve.md +++ b/website/docs/en/guide/resolve.md @@ -38,7 +38,7 @@ You can refer to the [TypeScript - paths](https://typescriptlang.org/tsconfig#pa ### Use `resolve.alias` Configuration -Rsbuild provides the [resolve.alias](/api/rspeedy.resolve.alias) configuration option, which corresponds to the webpack/Rspack native [resolve.alias](https://rspack.dev/config/resolve#resolvealias) configuration. You can configure this option using an object or a function. +Rsbuild provides the [resolve.alias](/api/rspeedy.resolve.alias) configuration option, which corresponds to the webpack/Rspack native [resolve.alias](https://rspack.rs/config/resolve#resolvealias) configuration. You can configure this option using an object or a function. #### Use Cases diff --git a/website/docs/zh/guide/assets.md b/website/docs/zh/guide/assets.md index fbf3773074..72bde1e8b7 100644 --- a/website/docs/zh/guide/assets.md +++ b/website/docs/zh/guide/assets.md @@ -168,7 +168,7 @@ import myFile from './static/myFile.pdf'; console.log(myFile); // "/static/myFile.6c12aba3.pdf" ``` -有关资源模块的更多信息,请参考 [Rspack - 资源模块](https://rspack.dev/guide/features/asset-module)。 +有关资源模块的更多信息,请参考 [Rspack - 资源模块](https://rspack.rs/guide/features/asset-module)。 [`dev.assetPrefix`]: ../../api/rspeedy.dev.assetprefix [`output.assetPrefix`]: ../../api/rspeedy.output.assetprefix diff --git a/website/docs/zh/guide/build-profiling.mdx b/website/docs/zh/guide/build-profiling.mdx index 20236fe67e..5a39b9ac39 100644 --- a/website/docs/zh/guide/build-profiling.mdx +++ b/website/docs/zh/guide/build-profiling.mdx @@ -22,7 +22,7 @@ RSPACK_PROFILE=OVERVIEW rspeedy build 当 build 命令执行完成,或是 dev server 被关闭时,Rspeedy 会在当前目录下生成一个 `.rspack-profile-${timestamp}-${pid}` 文件夹,其中包含 `trace.json` 文件,该文件由 Rspack 基于 tracing 细粒度地记录了各个阶段的耗时,可以使用 [ui.perfetto.dev](https://ui.perfetto.dev/) 进行查看。 -> 有关 Rspack 构建性能分析使用的更多信息,请参阅 [Rspack - Tracing](https://rspack.dev/contribute/development/tracing)。 +> 有关 Rspack 构建性能分析使用的更多信息,请参阅 [Rspack - Tracing](https://rspack.rs/contribute/development/tracing)。 ## Node.js profiling diff --git a/website/docs/zh/guide/code-splitting.md b/website/docs/zh/guide/code-splitting.md index b220bc9a41..d749c1d10d 100644 --- a/website/docs/zh/guide/code-splitting.md +++ b/website/docs/zh/guide/code-splitting.md @@ -2,7 +2,7 @@ > Rspack 支持代码分割特性,允许让你对代码进行分割,控制生成的资源体积和资源数量来获取资源加载性能的提升。 > -> [Rspack - 代码分割](https://rspack.dev/zh/guide/optimization/code-splitting) +> [Rspack - 代码分割](https://rspack.rs/zh/guide/optimization/code-splitting) ## 懒加载组件 diff --git a/website/docs/zh/guide/css.mdx b/website/docs/zh/guide/css.mdx index a0c9df74f2..9c91b3250e 100644 --- a/website/docs/zh/guide/css.mdx +++ b/website/docs/zh/guide/css.mdx @@ -136,7 +136,7 @@ declare module '*.module.css' { 它对于每个 CSS Modules 中含有的类名不够精确。 -使用 [Typed CSS Modules Plugin](https://rsbuild.dev/plugins/list/plugin-typed-css-modules) 将为所有 CSS Modules 生成具有精确类型声明的类型声明文件。 +使用 [Typed CSS Modules Plugin](https://rsbuild.rs/plugins/list/plugin-typed-css-modules) 将为所有 CSS Modules 生成具有精确类型声明的类型声明文件。 1. 安装 `@rsbuild/plugin-typed-css-modules` @@ -260,7 +260,7 @@ export default defineConfig({ }); ``` -在 `pluginSass` 中可以使用更多选项,请参阅 [Sass 插件](https://rsbuild.dev/plugins/list/plugin-sass)以了解用法。 +在 `pluginSass` 中可以使用更多选项,请参阅 [Sass 插件](https://rsbuild.rs/plugins/list/plugin-sass)以了解用法。 ### 使用 `less` @@ -302,7 +302,7 @@ export default defineConfig({ }); ``` -在 `pluginLess` 中可以使用更多选项,请参阅 [Less 插件](https://rsbuild.dev/plugins/list/plugin-less)以了解用法。 +在 `pluginLess` 中可以使用更多选项,请参阅 [Less 插件](https://rsbuild.rs/plugins/list/plugin-less)以了解用法。 ## 使用 PostCSS \{#using-postcss} diff --git a/website/docs/zh/guide/i18n.mdx b/website/docs/zh/guide/i18n.mdx index fa64c5d8ea..ae7e76d3a2 100644 --- a/website/docs/zh/guide/i18n.mdx +++ b/website/docs/zh/guide/i18n.mdx @@ -114,7 +114,7 @@ export function App() { 在真实的项目中,通常有多个不同语言的文案资源。 -你可以使用 [`import.meta.webpackContext`](https://rspack.dev/api/runtime-api/module-variables#importmetawebpackcontext) API 来一次性将他们全部引入: +你可以使用 [`import.meta.webpackContext`](https://rspack.rs/api/runtime-api/module-variables#importmetawebpackcontext) API 来一次性将他们全部引入: diff --git a/website/docs/zh/guide/plugin.md b/website/docs/zh/guide/plugin.md index 7e36576ea5..21c7325b8a 100644 --- a/website/docs/zh/guide/plugin.md +++ b/website/docs/zh/guide/plugin.md @@ -17,8 +17,8 @@ Rsbuild 提供了一套强大的插件系统,允许用户进行功能扩展。 以下 Rsbuild 插件可直接在 Rspeedy 中使用: -- [Sass 插件](https://rsbuild.dev/plugins/list/plugin-sass): 使用 Sass 作为 CSS 预处理器 -- [Less 插件](https://rsbuild.dev/plugins/list/plugin-less): 使用 Less 作为 CSS 预处理器 +- [Sass 插件](https://rsbuild.rs/plugins/list/plugin-sass): 使用 Sass 作为 CSS 预处理器 +- [Less 插件](https://rsbuild.rs/plugins/list/plugin-less): 使用 Less 作为 CSS 预处理器 - [ESLint 插件](https://github.com/rspack-contrib/rsbuild-plugin-eslint): 在编译过程中执行 ESLint 检查 - [TypeScript 类型检查插件](https://github.com/rspack-contrib/rsbuild-plugin-type-check): 在独立进程中进行 TypeScript 类型检查 - [图片压缩插件](https://github.com/rspack-contrib/rsbuild-plugin-image-compress): 压缩图片资源 @@ -43,14 +43,14 @@ Rspack/Webpack 插件需要配置在 [`tools.rspack.plugins`] 中 ### Rsbuild 插件 API -详见 [Rsbuild - 插件钩子](https://rsbuild.dev/plugins/dev/hooks) +详见 [Rsbuild - 插件钩子](https://rsbuild.rs/plugins/dev/hooks) ### Rspack 插件 API -详见 [Rspack - Compiler 钩子](https://rspack.dev/api/plugin-api/compiler-hooks)和 [Rspack - Compilation 钩子](https://rspack.dev/api/plugin-api/compilation-hooks) +详见 [Rspack - Compiler 钩子](https://rspack.rs/api/plugin-api/compiler-hooks)和 [Rspack - Compilation 钩子](https://rspack.rs/api/plugin-api/compilation-hooks) [`tools.rspack.plugins`]: ../../api/rspeedy.tools.rspack#example-4 -[Banner 插件]: https://rspack.dev/plugins/webpack/banner-plugin -[Define 插件]: https://rspack.dev/plugins/webpack/define-plugin -[Environment 插件]: https://rspack.dev/plugins/webpack/environment-plugin -[Provide 插件]: https://rspack.dev/plugins/webpack/provide-plugin +[Banner 插件]: https://rspack.rs/plugins/webpack/banner-plugin +[Define 插件]: https://rspack.rs/plugins/webpack/define-plugin +[Environment 插件]: https://rspack.rs/plugins/webpack/environment-plugin +[Provide 插件]: https://rspack.rs/plugins/webpack/provide-plugin diff --git a/website/docs/zh/guide/resolve.md b/website/docs/zh/guide/resolve.md index 49866f1f1a..2d4565758a 100644 --- a/website/docs/zh/guide/resolve.md +++ b/website/docs/zh/guide/resolve.md @@ -39,7 +39,7 @@ ### 使用 `resolve.alias` 配置 -Rsbuild 提供 [resolve.alias](../../api/rspeedy.resolve.alias) 配置项,对应 webpack/Rspack 原生的 [resolve.alias](https://rspack.dev/config/resolve#resolvealias) 配置。可通过对象或函数形式进行配置。 +Rsbuild 提供 [resolve.alias](../../api/rspeedy.resolve.alias) 配置项,对应 webpack/Rspack 原生的 [resolve.alias](https://rspack.rs/config/resolve#resolvealias) 配置。可通过对象或函数形式进行配置。 #### 使用场景 diff --git a/website/src/styles/external-links.scss b/website/src/styles/external-links.scss index e13563dc17..67626e19d3 100644 --- a/website/src/styles/external-links.scss +++ b/website/src/styles/external-links.scss @@ -96,7 +96,7 @@ } // Rspack - a[target="_blank"][href*="rspack.dev"] { + a[target="_blank"][href*="rspack.rs"] { @include link-prefix("🦀"); &::after { content: "↗"; @@ -104,7 +104,7 @@ } @include external-link-hover; } - a[target="_blank"][href*="rsbuild.dev"] { + a[target="_blank"][href*="rsbuild.rs"] { @include link-prefix("🦀"); &::after { content: "↗";