diff --git a/e2e/cases/babel/preset-node/rsbuild.config.ts b/e2e/cases/babel/preset-node/rsbuild.config.ts index 7d63825ba8..7ef21fa326 100644 --- a/e2e/cases/babel/preset-node/rsbuild.config.ts +++ b/e2e/cases/babel/preset-node/rsbuild.config.ts @@ -2,7 +2,7 @@ import { pluginBabel } from '@rsbuild/plugin-babel'; export default { output: { - targets: ['node'], + target: 'node', }, plugins: [ pluginBabel({ diff --git a/e2e/cases/emit-assets/rsbuild.config.ts b/e2e/cases/emit-assets/rsbuild.config.ts index 2cba1e6513..75bc593756 100644 --- a/e2e/cases/emit-assets/rsbuild.config.ts +++ b/e2e/cases/emit-assets/rsbuild.config.ts @@ -3,7 +3,18 @@ import { defineConfig } from '@rsbuild/core'; export default defineConfig({ output: { filenameHash: false, - targets: ['web', 'node'], emitAssets: ({ target }) => target !== 'node', }, + environments: { + web: { + output: { + target: 'web', + }, + }, + node: { + output: { + target: 'node', + }, + }, + }, }); diff --git a/e2e/cases/ignore-css/removeCss.test.ts b/e2e/cases/ignore-css/removeCss.test.ts index 6bd869e887..878c9926b3 100644 --- a/e2e/cases/ignore-css/removeCss.test.ts +++ b/e2e/cases/ignore-css/removeCss.test.ts @@ -6,7 +6,7 @@ test('should ignore css content when build node target', async () => { cwd: __dirname, rsbuildConfig: { output: { - targets: ['node'], + target: 'node', }, }, }); @@ -27,7 +27,7 @@ test('should ignore css content when build web-worker target', async () => { cwd: __dirname, rsbuildConfig: { output: { - targets: ['web-worker'], + target: 'web-worker', }, }, }); diff --git a/e2e/cases/inspect-config/index.test.ts b/e2e/cases/inspect-config/index.test.ts index 5480438946..3cf40f525d 100644 --- a/e2e/cases/inspect-config/index.test.ts +++ b/e2e/cases/inspect-config/index.test.ts @@ -33,8 +33,17 @@ test('should generate bundler config for node when target contains node', async const rsbuild = await createRsbuild({ cwd: __dirname, rsbuildConfig: { - output: { - targets: ['web', 'node'], + environments: { + web: { + output: { + target: 'web', + }, + }, + node: { + output: { + target: 'node', + }, + }, }, }, }); diff --git a/e2e/cases/multi-compiler/index.test.ts b/e2e/cases/multi-compiler/index.test.ts index 655d005dbd..d5d0f95d9b 100644 --- a/e2e/cases/multi-compiler/index.test.ts +++ b/e2e/cases/multi-compiler/index.test.ts @@ -6,8 +6,17 @@ test('multi compiler build', async ({ page }) => { cwd: __dirname, runServer: true, rsbuildConfig: { - output: { - targets: ['web', 'node'], + environments: { + web: { + output: { + target: 'web', + }, + }, + node: { + output: { + target: 'node', + }, + }, }, }, }); @@ -25,11 +34,22 @@ test('multi compiler dev', async ({ page }) => { cwd: __dirname, rsbuildConfig: { output: { - targets: ['web', 'node'], distPath: { root: 'dist-dev', }, }, + environments: { + web: { + output: { + target: 'web', + }, + }, + node: { + output: { + target: 'node', + }, + }, + }, }, }); diff --git a/e2e/cases/node-addons/rsbuild.config.ts b/e2e/cases/node-addons/rsbuild.config.ts index 77dc66d064..b1d3877147 100644 --- a/e2e/cases/node-addons/rsbuild.config.ts +++ b/e2e/cases/node-addons/rsbuild.config.ts @@ -1,5 +1,5 @@ export default { output: { - targets: ['node'], + target: 'node', }, }; diff --git a/e2e/cases/output/externals/tests/index.test.ts b/e2e/cases/output/externals/tests/index.test.ts index 609bfb4a3e..4d0a182efa 100644 --- a/e2e/cases/output/externals/tests/index.test.ts +++ b/e2e/cases/output/externals/tests/index.test.ts @@ -44,7 +44,7 @@ test('should not external dependencies when target is web worker', async () => { plugins: [pluginReact()], rsbuildConfig: { output: { - targets: ['web-worker'], + target: 'web-worker', externals: { react: 'MyReact', }, diff --git a/e2e/cases/output/manifest/index.test.ts b/e2e/cases/output/manifest/index.test.ts index c7428c4efb..61c65cc156 100644 --- a/e2e/cases/output/manifest/index.test.ts +++ b/e2e/cases/output/manifest/index.test.ts @@ -77,7 +77,7 @@ test('output.manifest when target is node', async () => { distPath: { root: 'dist-1', }, - targets: ['node'], + target: 'node', manifest: true, legalComments: 'none', filenameHash: false, diff --git a/e2e/cases/performance/print-file-size/index.test.ts b/e2e/cases/performance/print-file-size/index.test.ts index 3510e9259a..12882880f6 100644 --- a/e2e/cases/performance/print-file-size/index.test.ts +++ b/e2e/cases/performance/print-file-size/index.test.ts @@ -39,11 +39,22 @@ test.describe('should print file size correctly', async () => { rsbuildConfig: { output: { filenameHash: false, - targets: ['web', 'node'], }, performance: { printFileSize: true, }, + environments: { + web: { + output: { + target: 'web', + }, + }, + node: { + output: { + target: 'node', + }, + }, + }, }, }); diff --git a/e2e/cases/plugin-api/plugin-after-build-hook/index.test.ts b/e2e/cases/plugin-api/plugin-after-build-hook/index.test.ts index 97b509bca6..8aff91f3e7 100644 --- a/e2e/cases/plugin-api/plugin-after-build-hook/index.test.ts +++ b/e2e/cases/plugin-api/plugin-after-build-hook/index.test.ts @@ -40,8 +40,17 @@ rspackOnlyTest( cwd: __dirname, rsbuildConfig: { plugins: [plugin], - output: { - targets: ['web', 'node'], + environments: { + web: { + output: { + target: 'web', + }, + }, + node: { + output: { + target: 'node', + }, + }, }, }, }); diff --git a/e2e/cases/plugin-api/plugin-transform-by-targets/rsbuild.config.ts b/e2e/cases/plugin-api/plugin-transform-by-targets/rsbuild.config.ts index 7fb86838ac..0e033c3457 100644 --- a/e2e/cases/plugin-api/plugin-transform-by-targets/rsbuild.config.ts +++ b/e2e/cases/plugin-api/plugin-transform-by-targets/rsbuild.config.ts @@ -2,7 +2,16 @@ import { myPlugin } from './myPlugin'; export default { plugins: [myPlugin], - output: { - targets: ['web', 'node'], + environments: { + web: { + output: { + target: 'web', + }, + }, + node: { + output: { + target: 'node', + }, + }, }, }; diff --git a/e2e/cases/source/alias-by-target/rsbuild.config.ts b/e2e/cases/source/alias-by-target/rsbuild.config.ts index a344c50bbe..339cd87d58 100644 --- a/e2e/cases/source/alias-by-target/rsbuild.config.ts +++ b/e2e/cases/source/alias-by-target/rsbuild.config.ts @@ -11,7 +11,18 @@ export default defineConfig({ }, }, output: { - targets: ['web', 'node'], filenameHash: false, }, + environments: { + web: { + output: { + target: 'web', + }, + }, + node: { + output: { + target: 'node', + }, + }, + }, }); diff --git a/e2e/cases/source/multiple-entry/rsbuild.config.ts b/e2e/cases/source/multiple-entry/rsbuild.config.ts index 9c4cedfc36..7ec315eea6 100644 --- a/e2e/cases/source/multiple-entry/rsbuild.config.ts +++ b/e2e/cases/source/multiple-entry/rsbuild.config.ts @@ -16,7 +16,18 @@ export default defineConfig({ }, }, output: { - targets: ['web', 'node'], filenameHash: false, }, + environments: { + web: { + output: { + target: 'web', + }, + }, + node: { + output: { + target: 'node', + }, + }, + }, }); diff --git a/e2e/cases/web-worker/web-worker-target/index.test.ts b/e2e/cases/web-worker/web-worker-target/index.test.ts index 9e31d0e87a..6ca792a39e 100644 --- a/e2e/cases/web-worker/web-worker-target/index.test.ts +++ b/e2e/cases/web-worker/web-worker-target/index.test.ts @@ -7,7 +7,7 @@ test('should build web-worker target correctly', async () => { cwd: __dirname, rsbuildConfig: { output: { - targets: ['web-worker'], + target: 'web-worker', }, }, }); @@ -27,7 +27,7 @@ test('should build web-worker target with dynamicImport correctly', async () => entry: { index: path.resolve(__dirname, './src/index2.js') }, }, output: { - targets: ['web-worker'], + target: 'web-worker', }, }, }); diff --git a/examples/node/rsbuild.config.ts b/examples/node/rsbuild.config.ts index 8d6216dccf..fbd0ed218a 100644 --- a/examples/node/rsbuild.config.ts +++ b/examples/node/rsbuild.config.ts @@ -2,6 +2,6 @@ import { defineConfig } from '@rsbuild/core'; export default defineConfig({ output: { - targets: ['node'], + target: 'node', }, }); diff --git a/examples/service-worker/rsbuild.config.ts b/examples/service-worker/rsbuild.config.ts index 5e7481b41e..c4943c448e 100644 --- a/examples/service-worker/rsbuild.config.ts +++ b/examples/service-worker/rsbuild.config.ts @@ -9,7 +9,7 @@ export default defineConfig({ root: './dist', worker: './', }, - targets: ['service-worker'], + target: 'service-worker', copy: ['./index.html'], }, }); diff --git a/package.json b/package.json index 4439cb166a..3c46aafb4e 100644 --- a/package.json +++ b/package.json @@ -61,11 +61,7 @@ "pnpm": { "overrides": { "esbuild": "~0.19.0", - "array.prototype.flat": "npm:@nolyfill/array.prototype.flat@1.0.28", - "@rsbuild/core": "link:packages/core", - "@rsbuild/plugin-less": "link:packages/plugin-less", - "@rsbuild/plugin-sass": "link:packages/plugin-sass", - "@rsbuild/plugin-react": "link:packages/plugin-react" + "array.prototype.flat": "npm:@nolyfill/array.prototype.flat@1.0.28" }, "allowedDeprecatedVersions": { "vue": "2.x", diff --git a/packages/compat/plugin-swc/tests/plugin.test.ts b/packages/compat/plugin-swc/tests/plugin.test.ts index f9a5dcf6eb..4c8464b63a 100644 --- a/packages/compat/plugin-swc/tests/plugin.test.ts +++ b/packages/compat/plugin-swc/tests/plugin.test.ts @@ -228,8 +228,27 @@ describe('plugin-swc', () => { plugins: [pluginSwc()], rsbuildConfig: { provider: webpackProvider, - output: { - targets: ['node', 'service-worker', 'web', 'web-worker'], + environments: { + node: { + output: { + target: 'node', + }, + }, + 'serviceWorker': { + output: { + target: 'service-worker', + }, + }, + web: { + output: { + target: 'web', + }, + }, + 'webWorker': { + output: { + target: 'web-worker', + }, + }, }, }, }); diff --git a/packages/compat/webpack/src/initConfigs.ts b/packages/compat/webpack/src/initConfigs.ts index 07470607f1..caab38b81f 100644 --- a/packages/compat/webpack/src/initConfigs.ts +++ b/packages/compat/webpack/src/initConfigs.ts @@ -26,10 +26,15 @@ export async function initConfigs({ context, pluginManager, }); - const { targets } = normalizedConfig.output; const webpackConfigs = await Promise.all( - targets.map((target) => generateWebpackConfig({ target, context })), + Object.entries(normalizedConfig.environments).map(([environment, config]) => + generateWebpackConfig({ + target: config.output.target, + context, + environment, + }), + ), ); // write Rsbuild config and webpack config to disk in debug mode diff --git a/packages/compat/webpack/src/inspectConfig.ts b/packages/compat/webpack/src/inspectConfig.ts index 46427cad99..cc8916ba45 100644 --- a/packages/compat/webpack/src/inspectConfig.ts +++ b/packages/compat/webpack/src/inspectConfig.ts @@ -46,9 +46,10 @@ export async function inspectConfig({ inspectOptions.verbose, ); const rawBundlerConfigs = await Promise.all( - webpackConfigs.map((config) => - stringifyConfig(config, inspectOptions.verbose), - ), + webpackConfigs.map(async (config) => ({ + name: config.name!, + content: await stringifyConfig(config, inspectOptions.verbose), + })), ); let outputPath = inspectOptions.outputPath || context.distPath; @@ -71,7 +72,7 @@ export async function inspectConfig({ return { rsbuildConfig: rawRsbuildConfig, - bundlerConfigs: rawBundlerConfigs, + bundlerConfigs: rawBundlerConfigs.map((r) => r.content), origin: { rsbuildConfig: rsbuildDebugConfig, bundlerConfigs: webpackConfigs, diff --git a/packages/compat/webpack/src/webpackConfig.ts b/packages/compat/webpack/src/webpackConfig.ts index c10c07aaf7..cf83bcd54d 100644 --- a/packages/compat/webpack/src/webpackConfig.ts +++ b/packages/compat/webpack/src/webpackConfig.ts @@ -68,6 +68,7 @@ async function modifyWebpackConfig( async function getChainUtils( target: RsbuildTarget, + environment: string, ): Promise { const { default: webpack } = await import('webpack'); const nameMap = { @@ -78,7 +79,7 @@ async function getChainUtils( }; return { - ...getBaseChainUtils(target), + ...getBaseChainUtils(target, environment), name: nameMap[target] || '', webpack, HtmlWebpackPlugin: __internalHelper.getHTMLPlugin(), @@ -136,11 +137,13 @@ async function getConfigUtils( export async function generateWebpackConfig({ target, context, + environment, }: { + environment: string; target: RsbuildTarget; context: InternalContext; }) { - const chainUtils = await getChainUtils(target); + const chainUtils = await getChainUtils(target, environment); const { default: webpack } = await import('webpack'); const { BannerPlugin, diff --git a/packages/compat/webpack/tests/__snapshots__/default.test.ts.snap b/packages/compat/webpack/tests/__snapshots__/default.test.ts.snap index 209250d36d..1b9e6d3594 100644 --- a/packages/compat/webpack/tests/__snapshots__/default.test.ts.snap +++ b/packages/compat/webpack/tests/__snapshots__/default.test.ts.snap @@ -217,7 +217,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = ` }, ], }, - "name": "Client", + "name": "web", "optimization": { "minimize": false, "splitChunks": { @@ -613,7 +613,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when produ }, ], }, - "name": "Client", + "name": "web", "optimization": { "minimize": true, "splitChunks": { @@ -1024,7 +1024,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe }, ], }, - "name": "Server", + "name": "node", "optimization": { "minimize": true, "splitChunks": false, @@ -1291,7 +1291,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe }, ], }, - "name": "Web Worker", + "name": "webWorker", "optimization": { "minimize": true, "splitChunks": false, diff --git a/packages/compat/webpack/tests/default.test.ts b/packages/compat/webpack/tests/default.test.ts index dc242099c1..2fb8e56cda 100644 --- a/packages/compat/webpack/tests/default.test.ts +++ b/packages/compat/webpack/tests/default.test.ts @@ -38,7 +38,7 @@ describe('applyDefaultPlugins', () => { const rsbuild = await createStubRsbuild({ rsbuildConfig: { output: { - targets: ['web-worker'], + target: 'web-worker', }, }, }); @@ -56,7 +56,7 @@ describe('applyDefaultPlugins', () => { const rsbuild = await createStubRsbuild({ rsbuildConfig: { output: { - targets: ['node'], + target: 'node', }, }, }); diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index 7ef385d661..80c4d887b2 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -129,7 +129,7 @@ const getDefaultPerformanceConfig = (): NormalizedPerformanceConfig => ({ }); const getDefaultOutputConfig = (): NormalizedOutputConfig => ({ - targets: ['web'], + target: 'web', distPath: { root: ROOT_DIST_DIR, js: JS_DIST_DIR, @@ -404,7 +404,6 @@ export async function loadConfig({ } export async function outputInspectConfigFiles({ - rsbuildConfig, rawRsbuildConfig, bundlerConfigs, inspectOptions, @@ -413,7 +412,10 @@ export async function outputInspectConfigFiles({ configType: string; rsbuildConfig: NormalizedConfig; rawRsbuildConfig: string; - bundlerConfigs: string[]; + bundlerConfigs: Array<{ + name: string; + content: string; + }>; inspectOptions: InspectConfigOptions & { outputPath: string; }; @@ -426,9 +428,8 @@ export async function outputInspectConfigFiles({ label: 'Rsbuild Config', content: rawRsbuildConfig, }, - ...bundlerConfigs.map((content, index) => { - const suffix = rsbuildConfig.output.targets[index]; - const outputFile = `${configType}.config.${suffix}.mjs`; + ...bundlerConfigs.map(({ name, content }) => { + const outputFile = `${configType}.config.${name}.mjs`; let outputFilePath = join(outputPath, outputFile); // if filename is conflict, add a random id to the filename. @@ -438,7 +439,7 @@ export async function outputInspectConfigFiles({ return { path: outputFilePath, - label: `${upperFirst(configType)} Config (${suffix})`, + label: `${upperFirst(configType)} Config (${name})`, content, }; }), diff --git a/packages/core/src/createContext.ts b/packages/core/src/createContext.ts index 1488a9c46d..7b16c07196 100644 --- a/packages/core/src/createContext.ts +++ b/packages/core/src/createContext.ts @@ -3,7 +3,6 @@ import type { BundlerType, NormalizedEnvironmentConfig, RsbuildContext, - RsbuildTarget, } from '@rsbuild/shared'; import { withDefaultConfig } from './config'; import { ROOT_DIST_DIR } from './constants'; @@ -45,7 +44,7 @@ async function createContextByConfig( return { entry: getEntryObject(config, 'web'), - targets: config.output?.targets || [], + targets: [config.output?.target || 'web'], version: RSBUILD_VERSION, environments: {}, rootPath, @@ -66,10 +65,9 @@ export function updateEnvironmentContext( Object.entries(configs).map(([name, config]) => [ name, { - // TODO: replace output.targets with output.target - target: config.output.targets[0], + target: config.output.target, distPath: getAbsoluteDistPath(context.rootPath, config), - entry: getEntryObject(config, config.output.targets[0]), + entry: getEntryObject(config, config.output.target), tsconfigPath: config.source.tsconfigPath ? getAbsolutePath(context.rootPath, config.source.tsconfigPath) : undefined, @@ -82,7 +80,6 @@ export function updateContextByNormalizedConfig( context: RsbuildContext, config: NormalizedConfig, ) { - context.targets = config.output.targets as RsbuildTarget[]; context.distPath = getAbsoluteDistPath(context.rootPath, config); if (config.source.entry) { diff --git a/packages/core/src/plugins/basic.ts b/packages/core/src/plugins/basic.ts index 87ad274fac..6b95cacd63 100644 --- a/packages/core/src/plugins/basic.ts +++ b/packages/core/src/plugins/basic.ts @@ -1,5 +1,4 @@ import path from 'node:path'; -import { TARGET_ID_MAP } from '../constants'; import { isProd } from '../helpers'; import type { NormalizedConfig, RsbuildPlugin } from '../types'; @@ -19,10 +18,10 @@ export const pluginBasic = (): RsbuildPlugin => ({ setup(api) { api.modifyBundlerChain( - (chain, { env, isProd, target, bundler, CHAIN_ID }) => { + (chain, { env, isProd, target, bundler, environment, CHAIN_ID }) => { const config = api.getNormalizedConfig(); - chain.name(TARGET_ID_MAP[target]); + chain.name(environment); chain.devtool(getJsSourceMap(config)); diff --git a/packages/core/src/provider/initConfigs.ts b/packages/core/src/provider/initConfigs.ts index 9ae4dbca9d..66d3a03a36 100644 --- a/packages/core/src/provider/initConfigs.ts +++ b/packages/core/src/provider/initConfigs.ts @@ -43,7 +43,7 @@ const normalizeEnvironmentsConfigs = ( ): Record => { const { environments, dev, server, provider, ...rsbuildSharedConfig } = normalizedConfig; - if (environments) { + if (environments && Object.keys(environments).length) { return Object.fromEntries( Object.entries(environments).map(([name, config]) => [ name, @@ -60,8 +60,7 @@ const normalizeEnvironmentsConfigs = ( } return { - // TODO: replace output.targets with output.target - [camelCase(rsbuildSharedConfig.output.targets[0])]: { + [camelCase(rsbuildSharedConfig.output.target)]: { ...rsbuildSharedConfig, dev, server, @@ -100,6 +99,9 @@ export async function initRsbuildConfig({ updateEnvironmentContext(context, environments); + // TODO: will remove soon + context.targets = Object.values(environments).map((e) => e.output.target); + return context.normalizedConfig; } @@ -111,10 +113,15 @@ export async function initConfigs({ rspackConfigs: RspackConfig[]; }> { const normalizedConfig = await initRsbuildConfig({ context, pluginManager }); - const { targets } = normalizedConfig.output; const rspackConfigs = await Promise.all( - targets.map((target) => generateRspackConfig({ target, context })), + Object.entries(normalizedConfig.environments).map(([environment, config]) => + generateRspackConfig({ + target: config.output.target, + context, + environment, + }), + ), ); // write Rsbuild config and Rspack config to disk in debug mode diff --git a/packages/core/src/provider/inspectConfig.ts b/packages/core/src/provider/inspectConfig.ts index 0655b6d4ac..72192f772b 100644 --- a/packages/core/src/provider/inspectConfig.ts +++ b/packages/core/src/provider/inspectConfig.ts @@ -48,9 +48,10 @@ export async function inspectConfig({ ); const rawBundlerConfigs = await Promise.all( - rspackConfigs.map((config) => - stringifyConfig(config, inspectOptions.verbose), - ), + rspackConfigs.map(async (config, index) => ({ + name: config.name || String(index), + content: await stringifyConfig(config, inspectOptions.verbose), + })), ); let outputPath = inspectOptions.outputPath || context.distPath; @@ -73,7 +74,7 @@ export async function inspectConfig({ return { rsbuildConfig: rawRsbuildConfig, - bundlerConfigs: rawBundlerConfigs, + bundlerConfigs: rawBundlerConfigs.map((r) => r.content), origin: { rsbuildConfig: rsbuildDebugConfig, bundlerConfigs: rspackConfigs, diff --git a/packages/core/src/provider/rspackConfig.ts b/packages/core/src/provider/rspackConfig.ts index 81b98cf6c5..e7446bfbe6 100644 --- a/packages/core/src/provider/rspackConfig.ts +++ b/packages/core/src/provider/rspackConfig.ts @@ -88,10 +88,14 @@ async function getConfigUtils( }; } -export function getChainUtils(target: RsbuildTarget): ModifyChainUtils { +export function getChainUtils( + target: RsbuildTarget, + environment: string, +): ModifyChainUtils { const nodeEnv = getNodeEnv(); return { + environment, env: nodeEnv, target, isDev: nodeEnv === 'development', @@ -107,11 +111,13 @@ export function getChainUtils(target: RsbuildTarget): ModifyChainUtils { export async function generateRspackConfig({ target, context, + environment, }: { + environment: string; target: RsbuildTarget; context: InternalContext; }): Promise { - const chainUtils = getChainUtils(target); + const chainUtils = getChainUtils(target, environment); const { BannerPlugin, DefinePlugin, diff --git a/packages/core/tests/__snapshots__/basic.test.ts.snap b/packages/core/tests/__snapshots__/basic.test.ts.snap index 00517887d5..7bdbecfc89 100644 --- a/packages/core/tests/__snapshots__/basic.test.ts.snap +++ b/packages/core/tests/__snapshots__/basic.test.ts.snap @@ -15,7 +15,7 @@ exports[`plugin-basic > should apply basic config correctly in development 1`] = }, }, }, - "name": "Client", + "name": "web", "optimization": { "minimize": false, }, @@ -48,7 +48,7 @@ exports[`plugin-basic > should apply basic config correctly in production 1`] = }, }, }, - "name": "Client", + "name": "web", "optimization": { "minimize": true, }, diff --git a/packages/core/tests/__snapshots__/builder.test.ts.snap b/packages/core/tests/__snapshots__/builder.test.ts.snap index eab6115f54..096fcf7f6b 100644 --- a/packages/core/tests/__snapshots__/builder.test.ts.snap +++ b/packages/core/tests/__snapshots__/builder.test.ts.snap @@ -305,7 +305,7 @@ exports[`should use rspack as default bundler > apply rspack correctly 1`] = ` }, ], }, - "name": "Client", + "name": "web", "optimization": { "minimize": false, "splitChunks": { diff --git a/packages/core/tests/__snapshots__/default.test.ts.snap b/packages/core/tests/__snapshots__/default.test.ts.snap index 322340a7a9..ad95796ba5 100644 --- a/packages/core/tests/__snapshots__/default.test.ts.snap +++ b/packages/core/tests/__snapshots__/default.test.ts.snap @@ -305,7 +305,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = ` }, ], }, - "name": "Client", + "name": "web", "optimization": { "minimize": false, "splitChunks": { @@ -751,7 +751,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when prod }, ], }, - "name": "Client", + "name": "web", "optimization": { "minimize": true, "minimizer": [ @@ -1226,7 +1226,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe }, ], }, - "name": "Server", + "name": "node", "optimization": { "minimize": false, "splitChunks": false, @@ -1588,7 +1588,7 @@ exports[`tools.rspack > should match snapshot 1`] = ` }, ], }, - "name": "Client", + "name": "web", "optimization": { "minimize": false, "splitChunks": { diff --git a/packages/core/tests/__snapshots__/environments.test.ts.snap b/packages/core/tests/__snapshots__/environments.test.ts.snap index cca18bb28a..fdf0495ac3 100644 --- a/packages/core/tests/__snapshots__/environments.test.ts.snap +++ b/packages/core/tests/__snapshots__/environments.test.ts.snap @@ -71,9 +71,7 @@ exports[`environment config > should normalize environment config correctly 1`] "css": false, "js": undefined, }, - "targets": [ - "web", - ], + "target": "web", }, "performance": { "buildCache": true, @@ -197,9 +195,7 @@ exports[`environment config > should print environment config when inspect confi "css": false, "js": undefined, }, - "targets": [ - "web", - ], + "target": "web", }, "performance": { "buildCache": true, @@ -319,9 +315,7 @@ exports[`environment config > should print environment config when inspect confi "css": false, "js": undefined, }, - "targets": [ - "web", - ], + "target": "web", }, "performance": { "buildCache": true, @@ -446,9 +440,7 @@ exports[`environment config > should support modify environment config by api.mo "css": false, "js": undefined, }, - "targets": [ - "web", - ], + "target": "web", }, "performance": { "buildCache": true, @@ -568,9 +560,7 @@ exports[`environment config > should support modify environment config by api.mo "css": false, "js": undefined, }, - "targets": [ - "web", - ], + "target": "web", }, "performance": { "buildCache": true, @@ -691,9 +681,7 @@ exports[`environment config > should support modify environment config by api.mo "css": false, "js": undefined, }, - "targets": [ - "web", - ], + "target": "web", }, "performance": { "buildCache": true, diff --git a/packages/core/tests/css.test.ts b/packages/core/tests/css.test.ts index 1de39bdf00..52b9ba181c 100644 --- a/packages/core/tests/css.test.ts +++ b/packages/core/tests/css.test.ts @@ -160,7 +160,7 @@ describe('plugin-css injectStyles', () => { plugins: [pluginCss()], rsbuildConfig: { output: { - targets: ['node'], + target: 'node', injectStyles: true, }, }, diff --git a/packages/core/tests/default.test.ts b/packages/core/tests/default.test.ts index c5bc2a412e..b682625c57 100644 --- a/packages/core/tests/default.test.ts +++ b/packages/core/tests/default.test.ts @@ -31,7 +31,7 @@ describe('applyDefaultPlugins', () => { const rsbuild = await createStubRsbuild({ rsbuildConfig: { output: { - targets: ['node'], + target: 'node', }, }, }); diff --git a/packages/core/tests/html.test.ts b/packages/core/tests/html.test.ts index 6a9fb976be..99efb517c3 100644 --- a/packages/core/tests/html.test.ts +++ b/packages/core/tests/html.test.ts @@ -27,7 +27,7 @@ describe('plugin-html', () => { plugins: [pluginEntry(), pluginHtml()], rsbuildConfig: { output: { - targets: ['node'], + target: 'node', }, }, }); @@ -39,7 +39,7 @@ describe('plugin-html', () => { plugins: [pluginEntry(), pluginHtml()], rsbuildConfig: { output: { - targets: ['web-worker'], + target: 'web-worker', }, }, }); @@ -51,7 +51,7 @@ describe('plugin-html', () => { plugins: [pluginEntry(), pluginHtml()], rsbuildConfig: { output: { - targets: ['service-worker'], + target: 'service-worker', }, }, }); diff --git a/packages/core/tests/inlineChunk.test.ts b/packages/core/tests/inlineChunk.test.ts index 051788eb89..57acc43f21 100644 --- a/packages/core/tests/inlineChunk.test.ts +++ b/packages/core/tests/inlineChunk.test.ts @@ -45,7 +45,7 @@ describe('plugin-inline-chunk', () => { plugins: [pluginEntry(), pluginHtml(), pluginInlineChunk()], rsbuildConfig: { output: { - targets: ['node'], + target: 'node', }, }, }); @@ -60,7 +60,7 @@ describe('plugin-inline-chunk', () => { plugins: [pluginEntry(), pluginHtml(), pluginInlineChunk()], rsbuildConfig: { output: { - targets: ['web-worker'], + target: 'web-worker', }, }, }); diff --git a/packages/core/tests/nodeAddons.test.ts b/packages/core/tests/nodeAddons.test.ts index 532ad765f1..5dc943970c 100644 --- a/packages/core/tests/nodeAddons.test.ts +++ b/packages/core/tests/nodeAddons.test.ts @@ -7,7 +7,7 @@ describe('plugin-node-addons', () => { plugins: [pluginNodeAddons()], rsbuildConfig: { output: { - targets: ['node'], + target: 'node', }, }, }); @@ -22,7 +22,7 @@ describe('plugin-node-addons', () => { plugins: [pluginNodeAddons()], rsbuildConfig: { output: { - targets: ['web'], + target: 'web', }, }, }); @@ -37,7 +37,7 @@ describe('plugin-node-addons', () => { plugins: [pluginNodeAddons()], rsbuildConfig: { output: { - targets: ['web-worker'], + target: 'web-worker', }, }, }); @@ -52,7 +52,7 @@ describe('plugin-node-addons', () => { plugins: [pluginNodeAddons()], rsbuildConfig: { output: { - targets: ['service-worker'], + target: 'service-worker', }, }, }); diff --git a/packages/core/tests/output.test.ts b/packages/core/tests/output.test.ts index 3ebcda3785..487cc8e0c8 100644 --- a/packages/core/tests/output.test.ts +++ b/packages/core/tests/output.test.ts @@ -16,7 +16,7 @@ describe('plugin-output', () => { plugins: [pluginOutput()], rsbuildConfig: { output: { - targets: ['node'], + target: 'node', distPath: { server: 'server', }, diff --git a/packages/core/tests/splitChunks.test.ts b/packages/core/tests/splitChunks.test.ts index 48cc455e74..8208742078 100644 --- a/packages/core/tests/splitChunks.test.ts +++ b/packages/core/tests/splitChunks.test.ts @@ -175,7 +175,7 @@ describe('plugin-split-chunks', () => { plugins: [pluginSplitChunks()], rsbuildConfig: { output: { - targets: ['node'], + target: 'node', }, }, }); diff --git a/packages/core/tests/swc.test.ts b/packages/core/tests/swc.test.ts index d7dbebb5a4..2428799a06 100644 --- a/packages/core/tests/swc.test.ts +++ b/packages/core/tests/swc.test.ts @@ -8,7 +8,7 @@ describe('plugin-swc', () => { await matchConfigSnapshot({ output: { polyfill: 'entry', - targets: ['node'], + target: 'node', }, }); }); @@ -73,7 +73,7 @@ describe('plugin-swc', () => { await matchConfigSnapshot({ output: { polyfill: 'entry', - targets: ['node'], + target: 'node', }, }); }); diff --git a/packages/core/tests/target.test.ts b/packages/core/tests/target.test.ts index 8a857343bb..12a9c23a8e 100644 --- a/packages/core/tests/target.test.ts +++ b/packages/core/tests/target.test.ts @@ -14,7 +14,7 @@ vi.mock('@rsbuild/shared', async (importOriginal) => { describe('plugin-target', () => { const cases = [ { - targets: ['node' as const], + target: 'node' as const, browserslist: ['foo'], expected: { target: 'node' }, }, @@ -27,7 +27,7 @@ describe('plugin-target', () => { expected: { target: ['web', 'es2017'] }, }, { - targets: ['web-worker' as const], + target: 'web-worker' as const, browserslist: null, expected: { target: ['webworker', 'es2017'] }, }, @@ -42,7 +42,7 @@ describe('plugin-target', () => { plugins: [pluginTarget()], rsbuildConfig: { output: { - targets: item.targets, + target: item.target, }, }, }); diff --git a/packages/plugin-assets-retry/tests/assetsRetry.test.ts b/packages/plugin-assets-retry/tests/assetsRetry.test.ts index c1df67cfe5..c709b399f1 100644 --- a/packages/plugin-assets-retry/tests/assetsRetry.test.ts +++ b/packages/plugin-assets-retry/tests/assetsRetry.test.ts @@ -16,7 +16,7 @@ describe('plugin-assets-retry', () => { plugins: [pluginAssetsRetry()], rsbuildConfig: { output: { - targets: ['node'], + target: 'node', }, }, }); diff --git a/packages/plugin-check-syntax/tests/index.test.ts b/packages/plugin-check-syntax/tests/index.test.ts index 729f32be2c..26a05def02 100644 --- a/packages/plugin-check-syntax/tests/index.test.ts +++ b/packages/plugin-check-syntax/tests/index.test.ts @@ -26,7 +26,7 @@ describe('plugin-check-syntax', () => { plugins: [pluginCheckSyntax()], rsbuildConfig: { output: { - targets: ['node'], + target: 'node', }, }, }); diff --git a/packages/plugin-eslint/tests/index.test.ts b/packages/plugin-eslint/tests/index.test.ts index 324876bc19..7cbfe81af6 100644 --- a/packages/plugin-eslint/tests/index.test.ts +++ b/packages/plugin-eslint/tests/index.test.ts @@ -39,8 +39,17 @@ describe('plugin-type-check', () => { cwd: __dirname, plugins: [pluginEslint()], rsbuildConfig: { - output: { - targets: ['web', 'node'], + environments: { + web: { + output: { + target: 'web', + }, + }, + node: { + output: { + target: 'node', + }, + }, }, }, }); diff --git a/packages/plugin-react/tests/__snapshots__/index.test.ts.snap b/packages/plugin-react/tests/__snapshots__/index.test.ts.snap index f7277c6380..bcb677319d 100644 --- a/packages/plugin-react/tests/__snapshots__/index.test.ts.snap +++ b/packages/plugin-react/tests/__snapshots__/index.test.ts.snap @@ -332,7 +332,7 @@ exports[`plugins/react > should work with swc-loader 1`] = ` }, ], }, - "name": "Client", + "name": "web", "optimization": { "minimize": false, "splitChunks": { diff --git a/packages/plugin-react/tests/index.test.ts b/packages/plugin-react/tests/index.test.ts index 30541b606f..cc4163dc96 100644 --- a/packages/plugin-react/tests/index.test.ts +++ b/packages/plugin-react/tests/index.test.ts @@ -32,7 +32,7 @@ describe('plugins/react', () => { const rsbuild = await createStubRsbuild({ rsbuildConfig: { output: { - targets: ['node'], + target: 'node', }, }, }); @@ -46,7 +46,7 @@ describe('plugins/react', () => { const rsbuild = await createStubRsbuild({ rsbuildConfig: { output: { - targets: ['web-worker'], + target: 'web-worker', }, }, }); diff --git a/packages/plugin-rem/tests/index.test.ts b/packages/plugin-rem/tests/index.test.ts index 68bbe1d530..235803e87d 100644 --- a/packages/plugin-rem/tests/index.test.ts +++ b/packages/plugin-rem/tests/index.test.ts @@ -54,7 +54,7 @@ describe('plugin-rem', () => { rsbuildConfig: { plugins: [pluginRem()], output: { - targets: ['node'], + target: 'node', }, }, }); @@ -70,7 +70,7 @@ describe('plugin-rem', () => { rsbuildConfig: { plugins: [pluginRem()], output: { - targets: ['web-worker'], + target: 'web-worker', }, }, }); diff --git a/packages/plugin-styled-components/tests/index.test.ts b/packages/plugin-styled-components/tests/index.test.ts index 398669b8e6..9702f8e1ad 100644 --- a/packages/plugin-styled-components/tests/index.test.ts +++ b/packages/plugin-styled-components/tests/index.test.ts @@ -26,8 +26,17 @@ describe('plugins/styled-components', () => { it('should enable ssr option when target contains node', async () => { const rsbuild = await createRsbuild({ rsbuildConfig: { - output: { - targets: ['node', 'web'], + environments: { + node: { + output: { + target: 'node', + }, + }, + web: { + output: { + target: 'web', + }, + }, }, plugins: [pluginStyledComponents()], }, diff --git a/packages/plugin-type-check/tests/index.test.ts b/packages/plugin-type-check/tests/index.test.ts index 85772bbb0e..8444c9c884 100644 --- a/packages/plugin-type-check/tests/index.test.ts +++ b/packages/plugin-type-check/tests/index.test.ts @@ -59,8 +59,17 @@ describe('plugin-type-check', () => { cwd: __dirname, plugins: [pluginTypeCheck()], rsbuildConfig: { - output: { - targets: ['web', 'node'], + environments: { + web: { + output: { + target: 'web', + }, + }, + node: { + output: { + target: 'node', + }, + }, }, }, }); diff --git a/packages/shared/src/types/config/output.ts b/packages/shared/src/types/config/output.ts index acd8a5488e..87385caf50 100644 --- a/packages/shared/src/types/config/output.ts +++ b/packages/shared/src/types/config/output.ts @@ -208,9 +208,10 @@ export type EmitAssets = (params: { target: RsbuildTarget }) => boolean; export interface OutputConfig { /** - * Specify build targets to run in different target environments. + * Specify build target to run in specified environment. + * @default 'web' */ - targets?: RsbuildTarget[]; + target?: RsbuildTarget; /** * At build time, prevent some `import` dependencies from being packed into bundles in your code, and instead fetch them externally at runtime. * For more information, please see: [Rspack Externals](https://rspack.dev/config/externals) @@ -313,7 +314,7 @@ export type OverrideBrowserslist = | Partial>; export interface NormalizedOutputConfig extends OutputConfig { - targets: RsbuildTarget[]; + target: RsbuildTarget; filename: FilenameConfig; distPath: Omit, 'jsAsync' | 'cssAsync'> & { jsAsync?: string; diff --git a/packages/shared/src/types/hooks.ts b/packages/shared/src/types/hooks.ts index 4394972588..8bbe37ae78 100644 --- a/packages/shared/src/types/hooks.ts +++ b/packages/shared/src/types/hooks.ts @@ -99,6 +99,7 @@ export type ModifyChainUtils = { isServiceWorker: boolean; isWebWorker: boolean; CHAIN_ID: ChainIdentifier; + environment: string; HtmlPlugin: typeof HtmlWebpackPlugin; }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cc18814b55..642a8fac5e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,10 +7,6 @@ settings: overrides: esbuild: ~0.19.0 array.prototype.flat: npm:@nolyfill/array.prototype.flat@1.0.28 - '@rsbuild/core': link:packages/core - '@rsbuild/plugin-less': link:packages/plugin-less - '@rsbuild/plugin-sass': link:packages/plugin-sass - '@rsbuild/plugin-react': link:packages/plugin-react importers: @@ -96,7 +92,7 @@ importers: specifier: workspace:* version: link:../packages/compat/babel-preset '@rsbuild/core': - specifier: link:../packages/core + specifier: workspace:* version: link:../packages/core '@rsbuild/plugin-assets-retry': specifier: workspace:* @@ -120,7 +116,7 @@ importers: specifier: workspace:* version: link:../packages/plugin-image-compress '@rsbuild/plugin-less': - specifier: link:../packages/plugin-less + specifier: workspace:* version: link:../packages/plugin-less '@rsbuild/plugin-lightningcss': specifier: workspace:* @@ -138,13 +134,13 @@ importers: specifier: workspace:* version: link:../packages/plugin-pug '@rsbuild/plugin-react': - specifier: link:../packages/plugin-react + specifier: workspace:* version: link:../packages/plugin-react '@rsbuild/plugin-rem': specifier: workspace:* version: link:../packages/plugin-rem '@rsbuild/plugin-sass': - specifier: link:../packages/plugin-sass + specifier: workspace:* version: link:../packages/plugin-sass '@rsbuild/plugin-solid': specifier: workspace:* @@ -362,7 +358,7 @@ importers: version: 3.4.23(typescript@5.4.5) devDependencies: '@rsbuild/core': - specifier: link:../../../../packages/core + specifier: workspace:* version: link:../../../../packages/core '@rsbuild/plugin-babel': specifier: workspace:* @@ -385,7 +381,7 @@ importers: examples/lit: devDependencies: '@rsbuild/core': - specifier: link:../../packages/core + specifier: workspace:* version: link:../../packages/core lit: specifier: ^3.1.4 @@ -404,13 +400,13 @@ importers: version: 18.3.1(react@18.3.1) devDependencies: '@rsbuild/core': - specifier: link:../../packages/core + specifier: workspace:* version: link:../../packages/core '@rsbuild/plugin-mdx': specifier: workspace:* version: link:../../packages/plugin-mdx '@rsbuild/plugin-react': - specifier: link:../../packages/plugin-react + specifier: workspace:* version: link:../../packages/plugin-react typescript: specifier: ^5.4.2 @@ -426,10 +422,10 @@ importers: version: 18.3.1(react@18.3.1) devDependencies: '@rsbuild/core': - specifier: link:../../../packages/core + specifier: workspace:* version: link:../../../packages/core '@rsbuild/plugin-react': - specifier: link:../../../packages/plugin-react + specifier: workspace:* version: link:../../../packages/plugin-react examples/module-federation/remote: @@ -442,16 +438,16 @@ importers: version: 18.3.1(react@18.3.1) devDependencies: '@rsbuild/core': - specifier: link:../../../packages/core + specifier: workspace:* version: link:../../../packages/core '@rsbuild/plugin-react': - specifier: link:../../../packages/plugin-react + specifier: workspace:* version: link:../../../packages/plugin-react examples/node: devDependencies: '@rsbuild/core': - specifier: link:../../packages/core + specifier: workspace:* version: link:../../packages/core '@types/node': specifier: 18.x @@ -467,7 +463,7 @@ importers: version: 10.22.0 devDependencies: '@rsbuild/core': - specifier: link:../../packages/core + specifier: workspace:* version: link:../../packages/core '@rsbuild/plugin-preact': specifier: workspace:* @@ -486,10 +482,10 @@ importers: version: 18.3.1(react@18.3.1) devDependencies: '@rsbuild/core': - specifier: link:../../packages/core + specifier: workspace:* version: link:../../packages/core '@rsbuild/plugin-react': - specifier: link:../../packages/plugin-react + specifier: workspace:* version: link:../../packages/plugin-react '@types/react': specifier: ^18.3.3 @@ -504,7 +500,7 @@ importers: examples/service-worker: devDependencies: '@rsbuild/core': - specifier: link:../../packages/core + specifier: workspace:* version: link:../../packages/core typescript: specifier: ^5.4.2 @@ -517,7 +513,7 @@ importers: version: 1.8.17 devDependencies: '@rsbuild/core': - specifier: link:../../packages/core + specifier: workspace:* version: link:../../packages/core '@rsbuild/plugin-babel': specifier: workspace:* @@ -533,7 +529,7 @@ importers: version: 4.2.18 devDependencies: '@rsbuild/core': - specifier: link:../../packages/core + specifier: workspace:* version: link:../../packages/core '@rsbuild/plugin-svelte': specifier: workspace:* @@ -542,7 +538,7 @@ importers: examples/vanilla: devDependencies: '@rsbuild/core': - specifier: link:../../packages/core + specifier: workspace:* version: link:../../packages/core typescript: specifier: ^5.4.2 @@ -555,7 +551,7 @@ importers: version: 2.7.16 devDependencies: '@rsbuild/core': - specifier: link:../../packages/core + specifier: workspace:* version: link:../../packages/core '@rsbuild/plugin-vue2': specifier: workspace:* @@ -568,7 +564,7 @@ importers: version: 3.4.23(typescript@5.4.5) devDependencies: '@rsbuild/core': - specifier: link:../../packages/core + specifier: workspace:* version: link:../../packages/core '@rsbuild/plugin-vue': specifier: workspace:* @@ -584,7 +580,7 @@ importers: version: 18.3.1(react@18.3.1) devDependencies: '@rsbuild/core': - specifier: link:../../packages/core + specifier: workspace:* version: link:../../packages/core '@rsbuild/plugin-swc': specifier: workspace:* @@ -670,7 +666,7 @@ importers: version: 7.6.2 devDependencies: '@rsbuild/core': - specifier: link:../../core + specifier: workspace:* version: link:../../core '@rsbuild/webpack': specifier: workspace:* @@ -691,7 +687,7 @@ importers: packages/compat/webpack: dependencies: '@rsbuild/core': - specifier: link:../../core + specifier: workspace:* version: link:../../core '@rsbuild/shared': specifier: workspace:* @@ -880,7 +876,7 @@ importers: specifier: ^7.24.7 version: 7.24.7(@babel/core@7.24.7) '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@types/serialize-javascript': specifier: ^5.0.4 @@ -920,7 +916,7 @@ importers: version: 2.0.1 devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@scripts/test-helper': specifier: workspace:* @@ -945,7 +941,7 @@ importers: version: 2.4.1 devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core typescript: specifier: ^5.4.2 @@ -967,7 +963,7 @@ importers: version: 0.7.4 devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@scripts/test-helper': specifier: workspace:* @@ -983,7 +979,7 @@ importers: version: 5.0.1(lightningcss@1.25.1)(webpack@5.92.0) devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@types/lodash': specifier: ^4.17.5 @@ -1005,7 +1001,7 @@ importers: version: 5.92.0 devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@scripts/test-helper': specifier: workspace:* @@ -1027,7 +1023,7 @@ importers: version: 3.3.2 devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@rsbuild/webpack': specifier: workspace:* @@ -1046,7 +1042,7 @@ importers: version: link:../shared devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@scripts/test-helper': specifier: workspace:* @@ -1077,7 +1073,7 @@ importers: version: 1.25.1 devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@scripts/test-helper': specifier: workspace:* @@ -1096,7 +1092,7 @@ importers: version: 3.0.1(webpack@5.92.0) devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core typescript: specifier: ^5.4.2 @@ -1175,7 +1171,7 @@ importers: version: 1.1.2 devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core typescript: specifier: ^5.4.2 @@ -1184,7 +1180,7 @@ importers: packages/plugin-preact: devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@types/node': specifier: 18.x @@ -1203,7 +1199,7 @@ importers: version: 3.0.3 devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core typescript: specifier: ^5.4.2 @@ -1222,7 +1218,7 @@ importers: version: 0.14.2 devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@scripts/test-helper': specifier: workspace:* @@ -1244,13 +1240,13 @@ importers: version: 5.31.1 devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@rsbuild/plugin-less': - specifier: link:../plugin-less + specifier: workspace:* version: link:../plugin-less '@rsbuild/plugin-sass': - specifier: link:../plugin-sass + specifier: workspace:* version: link:../plugin-sass '@scripts/test-helper': specifier: workspace:* @@ -1284,7 +1280,7 @@ importers: version: 1.77.5 devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@scripts/test-helper': specifier: workspace:* @@ -1318,7 +1314,7 @@ importers: version: 0.6.3(solid-js@1.8.17) devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@scripts/test-helper': specifier: workspace:* @@ -1343,7 +1339,7 @@ importers: version: 2.2.3 devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@rsbuild/plugin-babel': specifier: workspace:* @@ -1365,7 +1361,7 @@ importers: version: link:../shared devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@types/node': specifier: 18.x @@ -1387,7 +1383,7 @@ importers: version: 8.1.0(@rspack/core@0.7.4(@swc/helpers@0.5.3))(stylus@0.63.0)(webpack@5.92.0) devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@scripts/test-helper': specifier: workspace:* @@ -1409,7 +1405,7 @@ importers: version: 5.1.4(@babel/core@7.24.7)(less@4.2.0)(postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.38)(tsx@4.14.0)(yaml@2.4.5))(postcss@8.4.38)(pug@3.0.3)(sass@1.77.5)(stylus@0.63.0)(svelte@4.2.18)(typescript@5.4.5) devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@scripts/test-helper': specifier: workspace:* @@ -1427,7 +1423,7 @@ importers: packages/plugin-svgr: dependencies: '@rsbuild/plugin-react': - specifier: link:../plugin-react + specifier: workspace:* version: link:../plugin-react '@rsbuild/shared': specifier: workspace:* @@ -1446,7 +1442,7 @@ importers: version: 2.0.4 devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@scripts/test-helper': specifier: workspace:* @@ -1474,7 +1470,7 @@ importers: version: 3.0.0 devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core typescript: specifier: ^5.4.2 @@ -1496,7 +1492,7 @@ importers: version: 5.92.0 devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@scripts/test-helper': specifier: workspace:* @@ -1512,7 +1508,7 @@ importers: version: link:../shared devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@scripts/test-helper': specifier: workspace:* @@ -1530,7 +1526,7 @@ importers: packages/plugin-umd: devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core typescript: specifier: ^5.4.2 @@ -1549,7 +1545,7 @@ importers: version: 5.92.0 devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@scripts/test-helper': specifier: workspace:* @@ -1577,7 +1573,7 @@ importers: specifier: ^7.24.7 version: 7.24.7 '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@scripts/test-helper': specifier: workspace:* @@ -1599,7 +1595,7 @@ importers: version: 5.92.0 devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@scripts/test-helper': specifier: workspace:* @@ -1621,7 +1617,7 @@ importers: specifier: ^7.24.7 version: 7.24.7 '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@scripts/test-helper': specifier: workspace:* @@ -1633,7 +1629,7 @@ importers: packages/plugin-yaml: devDependencies: '@rsbuild/core': - specifier: link:../core + specifier: workspace:* version: link:../core '@scripts/test-helper': specifier: workspace:* @@ -1728,7 +1724,7 @@ importers: scripts/test-helper: dependencies: '@rsbuild/core': - specifier: link:../../packages/core + specifier: workspace:* version: link:../../packages/core '@rsbuild/shared': specifier: workspace:* @@ -1752,11 +1748,11 @@ importers: website: devDependencies: '@rsbuild/core': - specifier: link:../packages/core + specifier: workspace:* version: link:../packages/core '@rspress/plugin-rss': specifier: 1.25.0 - version: 1.25.0(react@18.3.1)(rspress@1.25.0(webpack@5.92.0)) + version: 1.25.0(react@18.3.1)(rspress@1.25.0(@swc/helpers@0.5.3)(webpack@5.92.0)) '@types/node': specifier: 18.x version: 18.19.31 @@ -1786,7 +1782,7 @@ importers: version: 1.0.3 rspress: specifier: 1.25.0 - version: 1.25.0(webpack@5.92.0) + version: 1.25.0(@swc/helpers@0.5.3)(webpack@5.92.0) rspress-plugin-font-open-sans: specifier: 1.0.0 version: 1.0.0 @@ -3522,54 +3518,134 @@ packages: cpu: [x64] os: [win32] + '@rsbuild/core@0.7.8': + resolution: {integrity: sha512-TAXMh+gP3D3t8ThpsSyy+sAGNtzwGpjUxmONf9IeByIsucNaP/ltWVENYqGn8g035ZAvwfXIgJOvWHCSWFSAYw==} + engines: {node: '>=16.0.0'} + hasBin: true + + '@rsbuild/plugin-less@0.7.8': + resolution: {integrity: sha512-fsknrGMNlz3vjPBOoLD6O9pK+50nrSDibXt+hl0PpOAXv15P4+mrikEI839JFyEgga7G0/TUE5qH7NiAV56FmA==} + peerDependencies: + '@rsbuild/core': ^0.7.8 + + '@rsbuild/plugin-react@0.7.8': + resolution: {integrity: sha512-FDqSZVoGxdxtOZcLGOJTQJ3CPzJm5cPqwllntMxuwF4r3JaJVCrx5vdblYVA/9KWxDzAq4OR82VIfUNV5G8UuA==} + peerDependencies: + '@rsbuild/core': ^0.7.8 + + '@rsbuild/plugin-sass@0.7.8': + resolution: {integrity: sha512-HEwCUT2ixlguN5fyvRTI++wTXXUt7XVcxZVAnnt0tTfLNBxfr8rOZxWnDnp/b1dyM33K8xFnPF8tj+FVgKZJyA==} + peerDependencies: + '@rsbuild/core': ^0.7.8 + + '@rsbuild/shared@0.7.8': + resolution: {integrity: sha512-HyX294wfBVj63BFjuR4M3wYh/xQHPlzlObLHpfrX/FFfrNo+elDdnYb0SVKfuv0V8eTpaYuaWjjYq+kk+M+mIw==} + + '@rspack/binding-darwin-arm64@0.7.3': + resolution: {integrity: sha512-3Gg5yosndYYV0NpYiQ/+Z5UErKv5R7yijE59qVnXBRI80BbkSKUFA8Ulb4btc39l3Rx35ud4EBOALXHlLNA9CQ==} + cpu: [arm64] + os: [darwin] + '@rspack/binding-darwin-arm64@0.7.4': resolution: {integrity: sha512-K78fUe9OhFTV61kHYCuahNkBXCFJMmqSGyIgNtLR9Psk82IVCHkvxY5565An1Quvo1UmgVh5R2YmylKE81mwiw==} cpu: [arm64] os: [darwin] + '@rspack/binding-darwin-x64@0.7.3': + resolution: {integrity: sha512-VMOyiIGHOrwkPvvd3V8NKb0UW91hUnqJoQXdttoqbn+FNz9is/3GxPSiEyc+BISuoH1e9J9FATAq6diLqdJAAw==} + cpu: [x64] + os: [darwin] + '@rspack/binding-darwin-x64@0.7.4': resolution: {integrity: sha512-EQriu7oE+tZv25g5VJH6Ael74U42fmpb4zGs7wLmWyKfCtO6SegL3tJ8Jc6mMmp+vg949dVvkw7uB6TJjOqx2g==} cpu: [x64] os: [darwin] + '@rspack/binding-linux-arm64-gnu@0.7.3': + resolution: {integrity: sha512-Y1jArNhYSugH/BScvLGyodrjD0j3do1lNozSIOMXfmq0st/S5G+AmWWrxX06Ov6DudHW0EXEqC5oF9d9AbPKTg==} + cpu: [arm64] + os: [linux] + '@rspack/binding-linux-arm64-gnu@0.7.4': resolution: {integrity: sha512-yhJLkU1zEXMyHNWhh8pBEaK6cRAjFzRK2hqejhhZ0K+lqC0Af9bKvZyXXGrMfmmHlsh1VJ9VVmi21qcXr/kdzg==} cpu: [arm64] os: [linux] + '@rspack/binding-linux-arm64-musl@0.7.3': + resolution: {integrity: sha512-R5PhdHBRUsVVtKdQNbRZyKEd7MsML3yuzXzM/3KhyYLyBUqkyMcVxgjDyFGtZsRZXmGv+N0xYKGpJVvhbukzrg==} + cpu: [arm64] + os: [linux] + '@rspack/binding-linux-arm64-musl@0.7.4': resolution: {integrity: sha512-6GV3Ztl6Q1zdJmNo+dwHiJd2Y/IEH9qWOh4YHiyzYGbQQYpfhhLYwKexalWaAAhdMm6KKoeqzklgHImCINImEg==} cpu: [arm64] os: [linux] + '@rspack/binding-linux-x64-gnu@0.7.3': + resolution: {integrity: sha512-XX60MwIilJ4Pbvy4FVWf5CkROOa7ywnL/k8aVo6OMip62L2jiTpYfd85v/G2IQbeVDcE4967Pm782bpDFRCYfw==} + cpu: [x64] + os: [linux] + '@rspack/binding-linux-x64-gnu@0.7.4': resolution: {integrity: sha512-KFdAEIZ7mPnT0y198xVOa8vIT9tgpEFVidCSIlxdk65UGC59g6UxEQq1EVAbcBi1Ou6Zza/UtxIlzk6Ev6KDkQ==} cpu: [x64] os: [linux] + '@rspack/binding-linux-x64-musl@0.7.3': + resolution: {integrity: sha512-oIRXO2NoXnWj/oIXJuNUbCIRnumfLndqR8rXui1vni91TZ+yUFkE9S7mGPrbrBAUXovOaSaHxB0YYi5hZ8fy4A==} + cpu: [x64] + os: [linux] + '@rspack/binding-linux-x64-musl@0.7.4': resolution: {integrity: sha512-qekcXkv12oWRztZHXGzNAI92/O/+abU35/nGDycZmMtr+Qt2XS5hE1T9oBQ54yecIzUVDGNcYwhIMWBX6E2dmQ==} cpu: [x64] os: [linux] + '@rspack/binding-win32-arm64-msvc@0.7.3': + resolution: {integrity: sha512-XeQ6z6Oc8wkkLJCAkG8TyLkciui6PB7reJLOes3yy0AXUJnd6l7gfiDcjzeHJGATVRzuuJojP/FXurBMCQ76uA==} + cpu: [arm64] + os: [win32] + '@rspack/binding-win32-arm64-msvc@0.7.4': resolution: {integrity: sha512-D1BccimBVeA/k2ty/28ER/j3s/c0n0MtN4kpyjYwgRILVLRSr+rfbC75i8wYh8r8AXjhNWNG88LmrFN9e9i7Ug==} cpu: [arm64] os: [win32] + '@rspack/binding-win32-ia32-msvc@0.7.3': + resolution: {integrity: sha512-MWwswm5+v1Wd3DDJxFbCenOHOy8x+gGp0oBdLj0jlC5UntaaSvzfdb0H85AeVMYWPp584fOpAZfx0QPg3cg8yw==} + cpu: [ia32] + os: [win32] + '@rspack/binding-win32-ia32-msvc@0.7.4': resolution: {integrity: sha512-5//TZH0Y4fRuTQ/ZmNOVaIfPIQXtgNAI78QxvF8Amygk4Uqklpo3ceHGP+yZfZgjh3mzjoUK+22fWbq/cUmW0w==} cpu: [ia32] os: [win32] + '@rspack/binding-win32-x64-msvc@0.7.3': + resolution: {integrity: sha512-GzOTQxuJedTghyoUbW/RGbzbGRW+R1dRuZxer8Gtlv4558wxbCUj1d621nC2eZmELFc4RWbN9NFTwaecavttvQ==} + cpu: [x64] + os: [win32] + '@rspack/binding-win32-x64-msvc@0.7.4': resolution: {integrity: sha512-C3ZxIEYKvnjQbV19FfQE6CGO6vcGp2JcvSQCc6SHwU/KNxLDrI1pA7XUG5TKoGSsqVEDZN6H8fJxLUYPQBjJcg==} cpu: [x64] os: [win32] + '@rspack/binding@0.7.3': + resolution: {integrity: sha512-VYPOtaCb1lphNrHozZXy9L5ODGU76kp7ozCpYbF/CTFq8xaSkvkhNHwWMGXE2TIOvWZImMBRBuYX8/kjz/HiSA==} + '@rspack/binding@0.7.4': resolution: {integrity: sha512-H1rTtYxbxe40miV2gYLPwIxEn2yMY6+bq+fjfiRu61kTvllexPMBYgFpKqSAc5Qyyto9j9uCkR4MJEYj2R/SQQ==} + '@rspack/core@0.7.3': + resolution: {integrity: sha512-SUvt4P1nMML3Int2YE1Z2+noDIxjT/hzNtcKMXXqeFp4yFys37s7vC+BnCyzonvIbpxUg2gH+bCMCgav7+xR4A==} + engines: {node: '>=16.0.0'} + peerDependencies: + '@swc/helpers': '>=0.5.1' + peerDependenciesMeta: + '@swc/helpers': + optional: true + '@rspack/core@0.7.4': resolution: {integrity: sha512-HECQ0WL8iVS1Mwq2W2hfrStZZbtTPl/GjDdAZDMToPqWtSVGww99UDGIYTHW8G6kawQ3GY6wa86WTQNfXEpSCA==} engines: {node: '>=16.0.0'} @@ -3579,6 +3655,14 @@ packages: '@swc/helpers': optional: true + '@rspack/plugin-react-refresh@0.7.3': + resolution: {integrity: sha512-fuXXqb6Lhlt1Ynz35E3OAmb1po9EGWYtDJgDqzXVfA9DPcnCPIZpbx6hOLLTYQRYLic74w11J0H2FCUXMHVg1g==} + peerDependencies: + react-refresh: '>=0.10.0 <1.0.0' + peerDependenciesMeta: + react-refresh: + optional: true + '@rspack/plugin-react-refresh@0.7.4': resolution: {integrity: sha512-9tAJdG/xZ6hUtD5K5OVpwAl2yV2HFnNl5fU5aOR5VJ5Pk0rCsYwbEZRbRnmSZwzMWIKDnowhoTi+4Ha3JV3aeQ==} peerDependencies: @@ -11153,33 +11237,118 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.17.1': optional: true + '@rsbuild/core@0.7.8': + dependencies: + '@rsbuild/shared': 0.7.8(@swc/helpers@0.5.3) + '@rspack/core': 0.7.3(@swc/helpers@0.5.3) + '@swc/helpers': 0.5.3 + core-js: 3.36.1 + html-webpack-plugin: html-rspack-plugin@5.7.2(@rspack/core@0.7.3(@swc/helpers@0.5.3)) + postcss: 8.4.38 + + '@rsbuild/plugin-less@0.7.8(@rsbuild/core@0.7.8)(@swc/helpers@0.5.3)': + dependencies: + '@rsbuild/core': 0.7.8 + '@rsbuild/shared': 0.7.8(@swc/helpers@0.5.3) + transitivePeerDependencies: + - '@swc/helpers' + + '@rsbuild/plugin-react@0.7.8(@rsbuild/core@0.7.8)(@swc/helpers@0.5.3)': + dependencies: + '@rsbuild/core': 0.7.8 + '@rsbuild/shared': 0.7.8(@swc/helpers@0.5.3) + '@rspack/plugin-react-refresh': 0.7.3(react-refresh@0.14.2) + react-refresh: 0.14.2 + transitivePeerDependencies: + - '@swc/helpers' + + '@rsbuild/plugin-sass@0.7.8(@rsbuild/core@0.7.8)(@swc/helpers@0.5.3)': + dependencies: + '@rsbuild/core': 0.7.8 + '@rsbuild/shared': 0.7.8(@swc/helpers@0.5.3) + loader-utils: 2.0.4 + postcss: 8.4.38 + sass-embedded: 1.77.5 + transitivePeerDependencies: + - '@swc/helpers' + + '@rsbuild/shared@0.7.8(@swc/helpers@0.5.3)': + dependencies: + '@rspack/core': 0.7.3(@swc/helpers@0.5.3) + caniuse-lite: 1.0.30001636 + html-webpack-plugin: html-rspack-plugin@5.7.2(@rspack/core@0.7.3(@swc/helpers@0.5.3)) + postcss: 8.4.38 + optionalDependencies: + fsevents: 2.3.3 + transitivePeerDependencies: + - '@swc/helpers' + + '@rspack/binding-darwin-arm64@0.7.3': + optional: true + '@rspack/binding-darwin-arm64@0.7.4': optional: true + '@rspack/binding-darwin-x64@0.7.3': + optional: true + '@rspack/binding-darwin-x64@0.7.4': optional: true + '@rspack/binding-linux-arm64-gnu@0.7.3': + optional: true + '@rspack/binding-linux-arm64-gnu@0.7.4': optional: true + '@rspack/binding-linux-arm64-musl@0.7.3': + optional: true + '@rspack/binding-linux-arm64-musl@0.7.4': optional: true + '@rspack/binding-linux-x64-gnu@0.7.3': + optional: true + '@rspack/binding-linux-x64-gnu@0.7.4': optional: true + '@rspack/binding-linux-x64-musl@0.7.3': + optional: true + '@rspack/binding-linux-x64-musl@0.7.4': optional: true + '@rspack/binding-win32-arm64-msvc@0.7.3': + optional: true + '@rspack/binding-win32-arm64-msvc@0.7.4': optional: true + '@rspack/binding-win32-ia32-msvc@0.7.3': + optional: true + '@rspack/binding-win32-ia32-msvc@0.7.4': optional: true + '@rspack/binding-win32-x64-msvc@0.7.3': + optional: true + '@rspack/binding-win32-x64-msvc@0.7.4': optional: true + '@rspack/binding@0.7.3': + optionalDependencies: + '@rspack/binding-darwin-arm64': 0.7.3 + '@rspack/binding-darwin-x64': 0.7.3 + '@rspack/binding-linux-arm64-gnu': 0.7.3 + '@rspack/binding-linux-arm64-musl': 0.7.3 + '@rspack/binding-linux-x64-gnu': 0.7.3 + '@rspack/binding-linux-x64-musl': 0.7.3 + '@rspack/binding-win32-arm64-msvc': 0.7.3 + '@rspack/binding-win32-ia32-msvc': 0.7.3 + '@rspack/binding-win32-x64-msvc': 0.7.3 + '@rspack/binding@0.7.4': optionalDependencies: '@rspack/binding-darwin-arm64': 0.7.4 @@ -11192,6 +11361,16 @@ snapshots: '@rspack/binding-win32-ia32-msvc': 0.7.4 '@rspack/binding-win32-x64-msvc': 0.7.4 + '@rspack/core@0.7.3(@swc/helpers@0.5.3)': + dependencies: + '@module-federation/runtime-tools': 0.1.6 + '@rspack/binding': 0.7.3 + caniuse-lite: 1.0.30001636 + tapable: 2.2.1 + webpack-sources: 3.2.3 + optionalDependencies: + '@swc/helpers': 0.5.3 + '@rspack/core@0.7.4(@swc/helpers@0.5.3)': dependencies: '@module-federation/runtime-tools': 0.1.6 @@ -11202,21 +11381,25 @@ snapshots: optionalDependencies: '@swc/helpers': 0.5.3 + '@rspack/plugin-react-refresh@0.7.3(react-refresh@0.14.2)': + optionalDependencies: + react-refresh: 0.14.2 + '@rspack/plugin-react-refresh@0.7.4(react-refresh@0.14.2)': optionalDependencies: react-refresh: 0.14.2 - '@rspress/core@1.25.0(webpack@5.92.0)': + '@rspress/core@1.25.0(@swc/helpers@0.5.3)(webpack@5.92.0)': dependencies: '@loadable/component': 5.16.4(react@18.3.1) '@mdx-js/loader': 2.3.0(webpack@5.92.0) '@mdx-js/mdx': 2.3.0 '@mdx-js/react': 2.3.0(react@18.3.1) '@modern-js/utils': 2.53.0 - '@rsbuild/core': link:packages/core - '@rsbuild/plugin-less': link:packages/plugin-less - '@rsbuild/plugin-react': link:packages/plugin-react - '@rsbuild/plugin-sass': link:packages/plugin-sass + '@rsbuild/core': 0.7.8 + '@rsbuild/plugin-less': 0.7.8(@rsbuild/core@0.7.8)(@swc/helpers@0.5.3) + '@rsbuild/plugin-react': 0.7.8(@rsbuild/core@0.7.8)(@swc/helpers@0.5.3) + '@rsbuild/plugin-sass': 0.7.8(@rsbuild/core@0.7.8)(@swc/helpers@0.5.3) '@rspress/mdx-rs': 0.5.7 '@rspress/plugin-auto-nav-sidebar': 1.25.0 '@rspress/plugin-container-syntax': 1.25.0 @@ -11259,6 +11442,7 @@ snapshots: unist-util-visit-children: 2.0.2 yaml-front-matter: 4.1.1 transitivePeerDependencies: + - '@swc/helpers' - supports-color - webpack @@ -11314,12 +11498,12 @@ snapshots: '@rspress/runtime': 1.25.0 medium-zoom: 1.1.0 - '@rspress/plugin-rss@1.25.0(react@18.3.1)(rspress@1.25.0(webpack@5.92.0))': + '@rspress/plugin-rss@1.25.0(react@18.3.1)(rspress@1.25.0(@swc/helpers@0.5.3)(webpack@5.92.0))': dependencies: '@rspress/shared': 1.25.0 feed: 4.2.2 react: 18.3.1 - rspress: 1.25.0(webpack@5.92.0) + rspress: 1.25.0(@swc/helpers@0.5.3)(webpack@5.92.0) '@rspress/runtime@1.25.0': dependencies: @@ -11331,7 +11515,7 @@ snapshots: '@rspress/shared@1.25.0': dependencies: - '@rsbuild/core': link:packages/core + '@rsbuild/core': 0.7.8 chalk: 4.1.2 execa: 5.1.1 fs-extra: 11.2.0 @@ -13777,6 +13961,10 @@ snapshots: html-escaper@2.0.2: {} + html-rspack-plugin@5.7.2(@rspack/core@0.7.3(@swc/helpers@0.5.3)): + optionalDependencies: + '@rspack/core': 0.7.3(@swc/helpers@0.5.3) + html-rspack-plugin@5.7.2(@rspack/core@0.7.4(@swc/helpers@0.5.3)): optionalDependencies: '@rspack/core': 0.7.4(@swc/helpers@0.5.3) @@ -16371,15 +16559,16 @@ snapshots: rspress-plugin-font-open-sans@1.0.0: {} - rspress@1.25.0(webpack@5.92.0): + rspress@1.25.0(@swc/helpers@0.5.3)(webpack@5.92.0): dependencies: - '@rsbuild/core': link:packages/core - '@rspress/core': 1.25.0(webpack@5.92.0) + '@rsbuild/core': 0.7.8 + '@rspress/core': 1.25.0(@swc/helpers@0.5.3)(webpack@5.92.0) '@rspress/shared': 1.25.0 cac: 6.7.14 chalk: 5.3.0 chokidar: 3.6.0 transitivePeerDependencies: + - '@swc/helpers' - supports-color - webpack