From a7584b3e151ca34cdef951e363bbd7e9e721719b Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 31 Jan 2024 14:41:08 +0800 Subject: [PATCH 1/8] WIP: prepare for Rsbuild v0.4.0 --- .../uni-builder/src/webpack/plugins/babel.ts | 20 ++- .../src/webpack/plugins/tsLoader.ts | 131 +++++++++--------- 2 files changed, 83 insertions(+), 68 deletions(-) diff --git a/packages/builder/uni-builder/src/webpack/plugins/babel.ts b/packages/builder/uni-builder/src/webpack/plugins/babel.ts index c60496bdfebc..0df5989fb022 100644 --- a/packages/builder/uni-builder/src/webpack/plugins/babel.ts +++ b/packages/builder/uni-builder/src/webpack/plugins/babel.ts @@ -18,11 +18,25 @@ import { type PluginBabelOptions, } from '@rsbuild/plugin-babel'; +/** + * Plugin order: + * rspack mode: rsbuild:swc -> rsbuild:babel + * webpack mode: uni-builder:babel -> uni-builder:ts-loader -> rsbuild-webpack:swc + */ export const pluginBabel = (options?: PluginBabelOptions): RsbuildPlugin => ({ name: 'uni-builder:babel', + + post: [ + // will replace the babel rule + 'rsbuild-webpack:swc', + // will replace the babel rule + 'rsbuild-webpack:esbuild', + ], + setup(api) { - api.modifyBundlerChain( - async ( + api.modifyBundlerChain({ + order: 'pre', + handler: async ( chain, { CHAIN_ID, target, isProd, isServer, isServiceWorker }, ) => { @@ -167,7 +181,7 @@ export const pluginBabel = (options?: PluginBabelOptions): RsbuildPlugin => ({ // Using cloned options to keep options separate from each other .options(lodash.cloneDeep(babelOptions)); }, - ); + }); }, }); diff --git a/packages/builder/uni-builder/src/webpack/plugins/tsLoader.ts b/packages/builder/uni-builder/src/webpack/plugins/tsLoader.ts index a29d4aa5fcb9..022da40a7d68 100644 --- a/packages/builder/uni-builder/src/webpack/plugins/tsLoader.ts +++ b/packages/builder/uni-builder/src/webpack/plugins/tsLoader.ts @@ -44,81 +44,82 @@ export const pluginTsLoader = ( pre: ['uni-builder:babel'], - post: ['uni-builder:react'], - setup(api) { - api.modifyBundlerChain(async (chain, { target, CHAIN_ID }) => { - const config = api.getNormalizedConfig(); - const { rootPath } = api.context; - const browserslist = await getBrowserslistWithDefault( - rootPath, - config, - target, - ); + api.modifyBundlerChain({ + order: 'pre', + handler: async (chain, { target, CHAIN_ID }) => { + const config = api.getNormalizedConfig(); + const { rootPath } = api.context; + const browserslist = await getBrowserslistWithDefault( + rootPath, + config, + target, + ); - const baseBabelConfig = getBabelConfigForWeb({ - presetEnv: { - targets: browserslist, - useBuiltIns: getUseBuiltIns(config), - }, - }); + const baseBabelConfig = getBabelConfigForWeb({ + presetEnv: { + targets: browserslist, + useBuiltIns: getUseBuiltIns(config), + }, + }); - const babelUtils = getBabelUtils(baseBabelConfig); + const babelUtils = getBabelUtils(baseBabelConfig); - const babelLoaderOptions = mergeChainedOptions({ - defaults: baseBabelConfig, - options: babelOptions, - utils: babelUtils, - }); + const babelLoaderOptions = mergeChainedOptions({ + defaults: baseBabelConfig, + options: babelOptions, + utils: babelUtils, + }); - const includes: Array = []; - const excludes: Array = []; + const includes: Array = []; + const excludes: Array = []; - const tsLoaderUtils = { - addIncludes(items: string | RegExp | (string | RegExp)[]) { - includes.push(...castArray(items)); - }, - addExcludes(items: string | RegExp | (string | RegExp)[]) { - excludes.push(...castArray(items)); - }, - }; - const tsLoaderDefaultOptions = { - compilerOptions: { - target: 'esnext', - module: 'esnext', - }, - transpileOnly: true, - allowTsInNodeModules: true, - }; + const tsLoaderUtils = { + addIncludes(items: string | RegExp | (string | RegExp)[]) { + includes.push(...castArray(items)); + }, + addExcludes(items: string | RegExp | (string | RegExp)[]) { + excludes.push(...castArray(items)); + }, + }; + const tsLoaderDefaultOptions = { + compilerOptions: { + target: 'esnext', + module: 'esnext', + }, + transpileOnly: true, + allowTsInNodeModules: true, + }; - const tsLoaderOptions = mergeChainedOptions({ - defaults: tsLoaderDefaultOptions, - // @ts-expect-error ts-loader has incorrect types for compilerOptions - options, - utils: tsLoaderUtils, - }); - const rule = chain.module.rule(CHAIN_ID.RULE.TS); + const tsLoaderOptions = mergeChainedOptions({ + defaults: tsLoaderDefaultOptions, + // @ts-expect-error ts-loader has incorrect types for compilerOptions + options, + utils: tsLoaderUtils, + }); + const rule = chain.module.rule(CHAIN_ID.RULE.TS); - applyScriptCondition({ - rule, - config, - context: api.context, - includes, - excludes, - }); + applyScriptCondition({ + rule, + config, + context: api.context, + includes, + excludes, + }); - // adjust babel rule to only handle JS files - chain.module.rule(CHAIN_ID.RULE.JS).test(JS_REGEX); + // adjust babel rule to only handle JS files + chain.module.rule(CHAIN_ID.RULE.JS).test(JS_REGEX); - rule - .test(TS_REGEX) - .use(CHAIN_ID.USE.BABEL) - .loader(require.resolve('babel-loader')) - .options(babelLoaderOptions) - .end() - .use(CHAIN_ID.USE.TS) - .loader(require.resolve('ts-loader')) - .options(tsLoaderOptions); + rule + .test(TS_REGEX) + .use(CHAIN_ID.USE.BABEL) + .loader(require.resolve('babel-loader')) + .options(babelLoaderOptions) + .end() + .use(CHAIN_ID.USE.TS) + .loader(require.resolve('ts-loader')) + .options(tsLoaderOptions); + }, }); }, }; From 5d56d420f9bdc28d4d182adfca3c279427e0448f Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 1 Feb 2024 15:09:39 +0800 Subject: [PATCH 2/8] chore: fix fullySpecified --- packages/builder/uni-builder/src/webpack/plugins/babel.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/builder/uni-builder/src/webpack/plugins/babel.ts b/packages/builder/uni-builder/src/webpack/plugins/babel.ts index 45d98f892c30..262ed43bda44 100644 --- a/packages/builder/uni-builder/src/webpack/plugins/babel.ts +++ b/packages/builder/uni-builder/src/webpack/plugins/babel.ts @@ -172,6 +172,10 @@ export const pluginBabel = (options?: PluginBabelOptions): RsbuildPlugin => ({ .mimetype({ or: ['text/javascript', 'application/javascript'], }) + // compatible with legacy packages with type="module" + // https://github.com/webpack/webpack/issues/11467 + .resolve.set('fullySpecified', false) + .end() .use(CHAIN_ID.USE.BABEL) .loader(require.resolve('babel-loader')) // Using cloned options to keep options separate from each other From 6c8789de12e6ede992fa13b545512dbc9bb99342 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 1 Feb 2024 16:25:32 +0800 Subject: [PATCH 3/8] chore: move antd and arco plugins --- .../src/shared/parseCommonConfig.ts | 4 + .../uni-builder/src/shared/plugins/antd.ts | 48 ++++++++ .../uni-builder/src/shared/plugins/arco.ts | 47 ++++++++ .../document/main-doc/scripts/summary.en.json | 107 +----------------- .../document/main-doc/scripts/summary.zh.json | 107 +----------------- 5 files changed, 101 insertions(+), 212 deletions(-) create mode 100644 packages/builder/uni-builder/src/shared/plugins/antd.ts create mode 100644 packages/builder/uni-builder/src/shared/plugins/arco.ts diff --git a/packages/builder/uni-builder/src/shared/parseCommonConfig.ts b/packages/builder/uni-builder/src/shared/parseCommonConfig.ts index c1fc8132354b..50569b8e46f9 100644 --- a/packages/builder/uni-builder/src/shared/parseCommonConfig.ts +++ b/packages/builder/uni-builder/src/shared/parseCommonConfig.ts @@ -33,6 +33,8 @@ import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'; import { pluginPostcssLegacy } from './plugins/postcssLegacy'; import { pluginDevtool } from './plugins/devtools'; import { pluginEmitRouteFile } from './plugins/emitRouteFile'; +import { pluginAntd } from './plugins/antd'; +import { pluginArco } from './plugins/arco'; const GLOBAL_CSS_REGEX = /\.global\.\w+$/; @@ -337,6 +339,8 @@ export async function parseCommonConfig( pluginEmitRouteFile(), pluginToml(), pluginYaml(), + pluginAntd(), + pluginArco(), ]; if (checkSyntax) { diff --git a/packages/builder/uni-builder/src/shared/plugins/antd.ts b/packages/builder/uni-builder/src/shared/plugins/antd.ts new file mode 100644 index 000000000000..b32bdc5cf8dc --- /dev/null +++ b/packages/builder/uni-builder/src/shared/plugins/antd.ts @@ -0,0 +1,48 @@ +import { isServerTarget, type RsbuildPlugin } from '@rsbuild/shared'; + +const getAntdMajorVersion = (appDirectory: string) => { + try { + const pkgJsonPath = require.resolve('antd/package.json', { + paths: [appDirectory], + }); + const { version } = require(pkgJsonPath); + return Number(version.split('.')[0]); + } catch (err) { + return null; + } +}; + +export const pluginAntd = (): RsbuildPlugin => ({ + name: 'uni-builder:antd', + setup(api) { + api.modifyRsbuildConfig(rsbuildConfig => { + rsbuildConfig.source ??= {}; + + if ( + rsbuildConfig.source.transformImport === false || + rsbuildConfig.source.transformImport?.some( + item => item.libraryName === 'antd', + ) + ) { + return; + } + + const antdMajorVersion = getAntdMajorVersion(api.context.rootPath); + // antd >= v5 no longer need babel-plugin-import + // see: https://ant.design/docs/react/migration-v5#remove-babel-plugin-import + if (antdMajorVersion && antdMajorVersion < 5) { + rsbuildConfig.source ??= {}; + rsbuildConfig.source.transformImport = [ + ...(rsbuildConfig.source.transformImport || []), + { + libraryName: 'antd', + libraryDirectory: isServerTarget(api.context.targets) + ? 'lib' + : 'es', + style: true, + }, + ]; + } + }); + }, +}); diff --git a/packages/builder/uni-builder/src/shared/plugins/arco.ts b/packages/builder/uni-builder/src/shared/plugins/arco.ts new file mode 100644 index 000000000000..47851215ae6c --- /dev/null +++ b/packages/builder/uni-builder/src/shared/plugins/arco.ts @@ -0,0 +1,47 @@ +import { + isServerTarget, + isPackageInstalled, + type RsbuildPlugin, +} from '@rsbuild/shared'; + +export const pluginArco = (): RsbuildPlugin => ({ + name: 'uni-builder:arco', + + setup(api) { + const ARCO_NAME = '@arco-design/web-react'; + const ARCO_ICON = `${ARCO_NAME}/icon`; + + api.modifyRsbuildConfig(rsbuildConfig => { + const { transformImport = [] } = rsbuildConfig.source || {}; + + if ( + transformImport === false || + !isPackageInstalled(ARCO_NAME, api.context.rootPath) + ) { + return; + } + + const isUseSSR = isServerTarget(api.context.targets); + + if (!transformImport?.some(item => item.libraryName === ARCO_NAME)) { + transformImport.push({ + libraryName: ARCO_NAME, + libraryDirectory: isUseSSR ? 'lib' : 'es', + camelToDashComponentName: false, + style: true, + }); + } + + if (!transformImport?.some(item => item.libraryName === ARCO_ICON)) { + transformImport.push({ + libraryName: ARCO_ICON, + libraryDirectory: isUseSSR ? 'react-icon-cjs' : 'react-icon', + camelToDashComponentName: false, + }); + } + + rsbuildConfig.source ||= {}; + rsbuildConfig.source.transformImport = transformImport; + }); + }, +}); diff --git a/packages/document/main-doc/scripts/summary.en.json b/packages/document/main-doc/scripts/summary.en.json index e1fbf0605c8c..c22ba4337efd 100644 --- a/packages/document/main-doc/scripts/summary.en.json +++ b/packages/document/main-doc/scripts/summary.en.json @@ -1,106 +1 @@ -[ - { "name": "assetPrefix", "dirname": "dev" }, - { "name": "beforeStartUrl", "dirname": "dev" }, - { "name": "hmr", "dirname": "dev" }, - { "name": "host", "dirname": "dev" }, - { "name": "https", "dirname": "dev" }, - { "name": "port", "dirname": "dev" }, - { "name": "progressBar", "dirname": "dev" }, - { "name": "startUrl", "dirname": "dev" }, - { "name": "lazyCompilation", "dirname": "experiments" }, - { "name": "sourceBuild", "dirname": "experiments" }, - { "name": "appIcon", "dirname": "html" }, - { "name": "crossorigin", "dirname": "html" }, - { "name": "disableHtmlFolder", "dirname": "html" }, - { "name": "favicon", "dirname": "html" }, - { "name": "faviconByEntries", "dirname": "html" }, - { "name": "inject", "dirname": "html" }, - { "name": "injectByEntries", "dirname": "html" }, - { "name": "meta", "dirname": "html" }, - { "name": "metaByEntries", "dirname": "html" }, - { "name": "mountId", "dirname": "html" }, - { "name": "scriptLoading", "dirname": "html" }, - { "name": "tags", "dirname": "html" }, - { "name": "tagsByEntries", "dirname": "html" }, - { "name": "template", "dirname": "html" }, - { "name": "templateByEntries", "dirname": "html" }, - { "name": "templateParameters", "dirname": "html" }, - { "name": "templateParametersByEntries", "dirname": "html" }, - { "name": "title", "dirname": "html" }, - { "name": "titleByEntries", "dirname": "html" }, - { "name": "assetPrefix", "dirname": "output" }, - { "name": "assetsRetry", "dirname": "output" }, - { "name": "charset", "dirname": "output" }, - { "name": "cleanDistPath", "dirname": "output" }, - { "name": "convertToRem", "dirname": "output" }, - { "name": "copy", "dirname": "output" }, - { "name": "cssModuleLocalIdentName", "dirname": "output" }, - { "name": "cssModules", "dirname": "output" }, - { "name": "dataUriLimit", "dirname": "output" }, - { "name": "disableCssExtract", "dirname": "output" }, - { "name": "disableCssModuleExtension", "dirname": "output" }, - { "name": "disableFilenameHash", "dirname": "output" }, - { "name": "disableInlineRuntimeChunk", "dirname": "output" }, - { "name": "disableMinimize", "dirname": "output" }, - { "name": "disableSourceMap", "dirname": "output" }, - { "name": "disableSvgr", "dirname": "output" }, - { "name": "disableTsChecker", "dirname": "output" }, - { "name": "distPath", "dirname": "output" }, - { "name": "enableAssetFallback", "dirname": "output" }, - { "name": "enableAssetManifest", "dirname": "output" }, - { "name": "enableCssModuleTSDeclaration", "dirname": "output" }, - { "name": "enableInlineScripts", "dirname": "output" }, - { "name": "enableInlineStyles", "dirname": "output" }, - { "name": "enableLatestDecorators", "dirname": "output" }, - { "name": "externals", "dirname": "output" }, - { "name": "filename", "dirname": "output" }, - { "name": "legalComments", "dirname": "output" }, - { "name": "overrideBrowserslist", "dirname": "output" }, - { "name": "polyfill", "dirname": "output" }, - { "name": "svgDefaultExport", "dirname": "output" }, - { "name": "buildCache", "dirname": "performance" }, - { "name": "bundleAnalyze", "dirname": "performance" }, - { "name": "chunkSplit", "dirname": "performance" }, - { "name": "dnsPrefetch", "dirname": "performance" }, - { "name": "preconnect", "dirname": "performance" }, - { "name": "prefetch", "dirname": "performance" }, - { "name": "preload", "dirname": "performance" }, - { "name": "printFileSize", "dirname": "performance" }, - { "name": "profile", "dirname": "performance" }, - { "name": "removeConsole", "dirname": "performance" }, - { "name": "removeMomentLocale", "dirname": "performance" }, - { "name": "transformLodash", "dirname": "performance" }, - { "name": "checkSyntax", "dirname": "security" }, - { "name": "nonce", "dirname": "security" }, - { "name": "sri", "dirname": "security" }, - { "name": "alias", "dirname": "source" }, - { "name": "aliasStrategy", "dirname": "source" }, - { "name": "define", "dirname": "source" }, - { "name": "exclude", "dirname": "source" }, - { "name": "globalVars", "dirname": "source" }, - { "name": "include", "dirname": "source" }, - { "name": "moduleScopes", "dirname": "source" }, - { "name": "preEntry", "dirname": "source" }, - { "name": "resolveExtensionPrefix", "dirname": "source" }, - { "name": "resolveMainFields", "dirname": "source" }, - { "name": "transformImport", "dirname": "source" }, - { "name": "autoprefixer", "dirname": "tools" }, - { "name": "babel", "dirname": "tools" }, - { "name": "cssExtract", "dirname": "tools" }, - { "name": "cssLoader", "dirname": "tools" }, - { "name": "devServer", "dirname": "tools" }, - { "name": "htmlPlugin", "dirname": "tools" }, - { "name": "less", "dirname": "tools" }, - { "name": "minifyCss", "dirname": "tools" }, - { "name": "postcss", "dirname": "tools" }, - { "name": "pug", "dirname": "tools" }, - { "name": "rspack", "dirname": "tools" }, - { "name": "sass", "dirname": "tools" }, - { "name": "styleLoader", "dirname": "tools" }, - { "name": "styledComponents", "dirname": "tools" }, - { "name": "terser", "dirname": "tools" }, - { "name": "tsChecker", "dirname": "tools" }, - { "name": "tsLoader", "dirname": "tools" }, - { "name": "webpack", "dirname": "tools" }, - { "name": "webpackChain", "dirname": "tools" } -] +[{"name":"assetPrefix","dirname":"dev"},{"name":"beforeStartUrl","dirname":"dev"},{"name":"hmr","dirname":"dev"},{"name":"host","dirname":"dev"},{"name":"https","dirname":"dev"},{"name":"port","dirname":"dev"},{"name":"progressBar","dirname":"dev"},{"name":"startUrl","dirname":"dev"},{"name":"lazyCompilation","dirname":"experiments"},{"name":"sourceBuild","dirname":"experiments"},{"name":"appIcon","dirname":"html"},{"name":"crossorigin","dirname":"html"},{"name":"disableHtmlFolder","dirname":"html"},{"name":"favicon","dirname":"html"},{"name":"faviconByEntries","dirname":"html"},{"name":"inject","dirname":"html"},{"name":"injectByEntries","dirname":"html"},{"name":"meta","dirname":"html"},{"name":"metaByEntries","dirname":"html"},{"name":"mountId","dirname":"html"},{"name":"scriptLoading","dirname":"html"},{"name":"tags","dirname":"html"},{"name":"tagsByEntries","dirname":"html"},{"name":"template","dirname":"html"},{"name":"templateByEntries","dirname":"html"},{"name":"templateParameters","dirname":"html"},{"name":"templateParametersByEntries","dirname":"html"},{"name":"title","dirname":"html"},{"name":"titleByEntries","dirname":"html"},{"name":"assetPrefix","dirname":"output"},{"name":"assetsRetry","dirname":"output"},{"name":"charset","dirname":"output"},{"name":"cleanDistPath","dirname":"output"},{"name":"convertToRem","dirname":"output"},{"name":"copy","dirname":"output"},{"name":"cssModuleLocalIdentName","dirname":"output"},{"name":"cssModules","dirname":"output"},{"name":"dataUriLimit","dirname":"output"},{"name":"disableCssExtract","dirname":"output"},{"name":"disableCssModuleExtension","dirname":"output"},{"name":"disableFilenameHash","dirname":"output"},{"name":"disableInlineRuntimeChunk","dirname":"output"},{"name":"disableMinimize","dirname":"output"},{"name":"disableSourceMap","dirname":"output"},{"name":"disableSvgr","dirname":"output"},{"name":"disableTsChecker","dirname":"output"},{"name":"distPath","dirname":"output"},{"name":"enableAssetFallback","dirname":"output"},{"name":"enableAssetManifest","dirname":"output"},{"name":"enableCssModuleTSDeclaration","dirname":"output"},{"name":"enableInlineScripts","dirname":"output"},{"name":"enableInlineStyles","dirname":"output"},{"name":"enableLatestDecorators","dirname":"output"},{"name":"externals","dirname":"output"},{"name":"filename","dirname":"output"},{"name":"legalComments","dirname":"output"},{"name":"overrideBrowserslist","dirname":"output"},{"name":"polyfill","dirname":"output"},{"name":"svgDefaultExport","dirname":"output"},{"name":"buildCache","dirname":"performance"},{"name":"bundleAnalyze","dirname":"performance"},{"name":"chunkSplit","dirname":"performance"},{"name":"dnsPrefetch","dirname":"performance"},{"name":"preconnect","dirname":"performance"},{"name":"prefetch","dirname":"performance"},{"name":"preload","dirname":"performance"},{"name":"printFileSize","dirname":"performance"},{"name":"profile","dirname":"performance"},{"name":"removeConsole","dirname":"performance"},{"name":"removeMomentLocale","dirname":"performance"},{"name":"transformLodash","dirname":"performance"},{"name":"checkSyntax","dirname":"security"},{"name":"nonce","dirname":"security"},{"name":"sri","dirname":"security"},{"name":"alias","dirname":"source"},{"name":"aliasStrategy","dirname":"source"},{"name":"define","dirname":"source"},{"name":"exclude","dirname":"source"},{"name":"globalVars","dirname":"source"},{"name":"include","dirname":"source"},{"name":"moduleScopes","dirname":"source"},{"name":"preEntry","dirname":"source"},{"name":"resolveExtensionPrefix","dirname":"source"},{"name":"resolveMainFields","dirname":"source"},{"name":"transformImport","dirname":"source"},{"name":"autoprefixer","dirname":"tools"},{"name":"babel","dirname":"tools"},{"name":"cssExtract","dirname":"tools"},{"name":"cssLoader","dirname":"tools"},{"name":"devServer","dirname":"tools"},{"name":"htmlPlugin","dirname":"tools"},{"name":"less","dirname":"tools"},{"name":"minifyCss","dirname":"tools"},{"name":"postcss","dirname":"tools"},{"name":"pug","dirname":"tools"},{"name":"rspack","dirname":"tools"},{"name":"sass","dirname":"tools"},{"name":"styleLoader","dirname":"tools"},{"name":"styledComponents","dirname":"tools"},{"name":"terser","dirname":"tools"},{"name":"tsChecker","dirname":"tools"},{"name":"tsLoader","dirname":"tools"},{"name":"webpack","dirname":"tools"},{"name":"webpackChain","dirname":"tools"}] diff --git a/packages/document/main-doc/scripts/summary.zh.json b/packages/document/main-doc/scripts/summary.zh.json index e1fbf0605c8c..c22ba4337efd 100644 --- a/packages/document/main-doc/scripts/summary.zh.json +++ b/packages/document/main-doc/scripts/summary.zh.json @@ -1,106 +1 @@ -[ - { "name": "assetPrefix", "dirname": "dev" }, - { "name": "beforeStartUrl", "dirname": "dev" }, - { "name": "hmr", "dirname": "dev" }, - { "name": "host", "dirname": "dev" }, - { "name": "https", "dirname": "dev" }, - { "name": "port", "dirname": "dev" }, - { "name": "progressBar", "dirname": "dev" }, - { "name": "startUrl", "dirname": "dev" }, - { "name": "lazyCompilation", "dirname": "experiments" }, - { "name": "sourceBuild", "dirname": "experiments" }, - { "name": "appIcon", "dirname": "html" }, - { "name": "crossorigin", "dirname": "html" }, - { "name": "disableHtmlFolder", "dirname": "html" }, - { "name": "favicon", "dirname": "html" }, - { "name": "faviconByEntries", "dirname": "html" }, - { "name": "inject", "dirname": "html" }, - { "name": "injectByEntries", "dirname": "html" }, - { "name": "meta", "dirname": "html" }, - { "name": "metaByEntries", "dirname": "html" }, - { "name": "mountId", "dirname": "html" }, - { "name": "scriptLoading", "dirname": "html" }, - { "name": "tags", "dirname": "html" }, - { "name": "tagsByEntries", "dirname": "html" }, - { "name": "template", "dirname": "html" }, - { "name": "templateByEntries", "dirname": "html" }, - { "name": "templateParameters", "dirname": "html" }, - { "name": "templateParametersByEntries", "dirname": "html" }, - { "name": "title", "dirname": "html" }, - { "name": "titleByEntries", "dirname": "html" }, - { "name": "assetPrefix", "dirname": "output" }, - { "name": "assetsRetry", "dirname": "output" }, - { "name": "charset", "dirname": "output" }, - { "name": "cleanDistPath", "dirname": "output" }, - { "name": "convertToRem", "dirname": "output" }, - { "name": "copy", "dirname": "output" }, - { "name": "cssModuleLocalIdentName", "dirname": "output" }, - { "name": "cssModules", "dirname": "output" }, - { "name": "dataUriLimit", "dirname": "output" }, - { "name": "disableCssExtract", "dirname": "output" }, - { "name": "disableCssModuleExtension", "dirname": "output" }, - { "name": "disableFilenameHash", "dirname": "output" }, - { "name": "disableInlineRuntimeChunk", "dirname": "output" }, - { "name": "disableMinimize", "dirname": "output" }, - { "name": "disableSourceMap", "dirname": "output" }, - { "name": "disableSvgr", "dirname": "output" }, - { "name": "disableTsChecker", "dirname": "output" }, - { "name": "distPath", "dirname": "output" }, - { "name": "enableAssetFallback", "dirname": "output" }, - { "name": "enableAssetManifest", "dirname": "output" }, - { "name": "enableCssModuleTSDeclaration", "dirname": "output" }, - { "name": "enableInlineScripts", "dirname": "output" }, - { "name": "enableInlineStyles", "dirname": "output" }, - { "name": "enableLatestDecorators", "dirname": "output" }, - { "name": "externals", "dirname": "output" }, - { "name": "filename", "dirname": "output" }, - { "name": "legalComments", "dirname": "output" }, - { "name": "overrideBrowserslist", "dirname": "output" }, - { "name": "polyfill", "dirname": "output" }, - { "name": "svgDefaultExport", "dirname": "output" }, - { "name": "buildCache", "dirname": "performance" }, - { "name": "bundleAnalyze", "dirname": "performance" }, - { "name": "chunkSplit", "dirname": "performance" }, - { "name": "dnsPrefetch", "dirname": "performance" }, - { "name": "preconnect", "dirname": "performance" }, - { "name": "prefetch", "dirname": "performance" }, - { "name": "preload", "dirname": "performance" }, - { "name": "printFileSize", "dirname": "performance" }, - { "name": "profile", "dirname": "performance" }, - { "name": "removeConsole", "dirname": "performance" }, - { "name": "removeMomentLocale", "dirname": "performance" }, - { "name": "transformLodash", "dirname": "performance" }, - { "name": "checkSyntax", "dirname": "security" }, - { "name": "nonce", "dirname": "security" }, - { "name": "sri", "dirname": "security" }, - { "name": "alias", "dirname": "source" }, - { "name": "aliasStrategy", "dirname": "source" }, - { "name": "define", "dirname": "source" }, - { "name": "exclude", "dirname": "source" }, - { "name": "globalVars", "dirname": "source" }, - { "name": "include", "dirname": "source" }, - { "name": "moduleScopes", "dirname": "source" }, - { "name": "preEntry", "dirname": "source" }, - { "name": "resolveExtensionPrefix", "dirname": "source" }, - { "name": "resolveMainFields", "dirname": "source" }, - { "name": "transformImport", "dirname": "source" }, - { "name": "autoprefixer", "dirname": "tools" }, - { "name": "babel", "dirname": "tools" }, - { "name": "cssExtract", "dirname": "tools" }, - { "name": "cssLoader", "dirname": "tools" }, - { "name": "devServer", "dirname": "tools" }, - { "name": "htmlPlugin", "dirname": "tools" }, - { "name": "less", "dirname": "tools" }, - { "name": "minifyCss", "dirname": "tools" }, - { "name": "postcss", "dirname": "tools" }, - { "name": "pug", "dirname": "tools" }, - { "name": "rspack", "dirname": "tools" }, - { "name": "sass", "dirname": "tools" }, - { "name": "styleLoader", "dirname": "tools" }, - { "name": "styledComponents", "dirname": "tools" }, - { "name": "terser", "dirname": "tools" }, - { "name": "tsChecker", "dirname": "tools" }, - { "name": "tsLoader", "dirname": "tools" }, - { "name": "webpack", "dirname": "tools" }, - { "name": "webpackChain", "dirname": "tools" } -] +[{"name":"assetPrefix","dirname":"dev"},{"name":"beforeStartUrl","dirname":"dev"},{"name":"hmr","dirname":"dev"},{"name":"host","dirname":"dev"},{"name":"https","dirname":"dev"},{"name":"port","dirname":"dev"},{"name":"progressBar","dirname":"dev"},{"name":"startUrl","dirname":"dev"},{"name":"lazyCompilation","dirname":"experiments"},{"name":"sourceBuild","dirname":"experiments"},{"name":"appIcon","dirname":"html"},{"name":"crossorigin","dirname":"html"},{"name":"disableHtmlFolder","dirname":"html"},{"name":"favicon","dirname":"html"},{"name":"faviconByEntries","dirname":"html"},{"name":"inject","dirname":"html"},{"name":"injectByEntries","dirname":"html"},{"name":"meta","dirname":"html"},{"name":"metaByEntries","dirname":"html"},{"name":"mountId","dirname":"html"},{"name":"scriptLoading","dirname":"html"},{"name":"tags","dirname":"html"},{"name":"tagsByEntries","dirname":"html"},{"name":"template","dirname":"html"},{"name":"templateByEntries","dirname":"html"},{"name":"templateParameters","dirname":"html"},{"name":"templateParametersByEntries","dirname":"html"},{"name":"title","dirname":"html"},{"name":"titleByEntries","dirname":"html"},{"name":"assetPrefix","dirname":"output"},{"name":"assetsRetry","dirname":"output"},{"name":"charset","dirname":"output"},{"name":"cleanDistPath","dirname":"output"},{"name":"convertToRem","dirname":"output"},{"name":"copy","dirname":"output"},{"name":"cssModuleLocalIdentName","dirname":"output"},{"name":"cssModules","dirname":"output"},{"name":"dataUriLimit","dirname":"output"},{"name":"disableCssExtract","dirname":"output"},{"name":"disableCssModuleExtension","dirname":"output"},{"name":"disableFilenameHash","dirname":"output"},{"name":"disableInlineRuntimeChunk","dirname":"output"},{"name":"disableMinimize","dirname":"output"},{"name":"disableSourceMap","dirname":"output"},{"name":"disableSvgr","dirname":"output"},{"name":"disableTsChecker","dirname":"output"},{"name":"distPath","dirname":"output"},{"name":"enableAssetFallback","dirname":"output"},{"name":"enableAssetManifest","dirname":"output"},{"name":"enableCssModuleTSDeclaration","dirname":"output"},{"name":"enableInlineScripts","dirname":"output"},{"name":"enableInlineStyles","dirname":"output"},{"name":"enableLatestDecorators","dirname":"output"},{"name":"externals","dirname":"output"},{"name":"filename","dirname":"output"},{"name":"legalComments","dirname":"output"},{"name":"overrideBrowserslist","dirname":"output"},{"name":"polyfill","dirname":"output"},{"name":"svgDefaultExport","dirname":"output"},{"name":"buildCache","dirname":"performance"},{"name":"bundleAnalyze","dirname":"performance"},{"name":"chunkSplit","dirname":"performance"},{"name":"dnsPrefetch","dirname":"performance"},{"name":"preconnect","dirname":"performance"},{"name":"prefetch","dirname":"performance"},{"name":"preload","dirname":"performance"},{"name":"printFileSize","dirname":"performance"},{"name":"profile","dirname":"performance"},{"name":"removeConsole","dirname":"performance"},{"name":"removeMomentLocale","dirname":"performance"},{"name":"transformLodash","dirname":"performance"},{"name":"checkSyntax","dirname":"security"},{"name":"nonce","dirname":"security"},{"name":"sri","dirname":"security"},{"name":"alias","dirname":"source"},{"name":"aliasStrategy","dirname":"source"},{"name":"define","dirname":"source"},{"name":"exclude","dirname":"source"},{"name":"globalVars","dirname":"source"},{"name":"include","dirname":"source"},{"name":"moduleScopes","dirname":"source"},{"name":"preEntry","dirname":"source"},{"name":"resolveExtensionPrefix","dirname":"source"},{"name":"resolveMainFields","dirname":"source"},{"name":"transformImport","dirname":"source"},{"name":"autoprefixer","dirname":"tools"},{"name":"babel","dirname":"tools"},{"name":"cssExtract","dirname":"tools"},{"name":"cssLoader","dirname":"tools"},{"name":"devServer","dirname":"tools"},{"name":"htmlPlugin","dirname":"tools"},{"name":"less","dirname":"tools"},{"name":"minifyCss","dirname":"tools"},{"name":"postcss","dirname":"tools"},{"name":"pug","dirname":"tools"},{"name":"rspack","dirname":"tools"},{"name":"sass","dirname":"tools"},{"name":"styleLoader","dirname":"tools"},{"name":"styledComponents","dirname":"tools"},{"name":"terser","dirname":"tools"},{"name":"tsChecker","dirname":"tools"},{"name":"tsLoader","dirname":"tools"},{"name":"webpack","dirname":"tools"},{"name":"webpackChain","dirname":"tools"}] From 38c666f96804cdc1ff73e2db4c2a4b6edf301c4c Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 1 Feb 2024 16:26:43 +0800 Subject: [PATCH 4/8] chore: import isBeyondReact17 from utils --- packages/builder/uni-builder/src/webpack/plugins/babel.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/builder/uni-builder/src/webpack/plugins/babel.ts b/packages/builder/uni-builder/src/webpack/plugins/babel.ts index 262ed43bda44..ab1dc639c2b0 100644 --- a/packages/builder/uni-builder/src/webpack/plugins/babel.ts +++ b/packages/builder/uni-builder/src/webpack/plugins/babel.ts @@ -2,7 +2,7 @@ import lodash from 'lodash'; import { getBabelConfigForWeb } from '@rsbuild/babel-preset/web'; import { getBabelConfigForNode } from '@rsbuild/babel-preset/node'; import type { BabelConfig } from '@rsbuild/babel-preset'; -import { isBeyondReact17 } from '@rsbuild/plugin-react'; +import { isBeyondReact17 } from '@modern-js/utils'; import { SCRIPT_REGEX, mergeChainedOptions, @@ -46,7 +46,7 @@ export const pluginBabel = (options?: PluginBabelOptions): RsbuildPlugin => ({ config, target, ); - const isNewJsx = await isBeyondReact17(api.context.rootPath); + const isNewJsx = isBeyondReact17(api.context.rootPath); const getBabelOptions = (config: NormalizedConfig) => { // Create babel util function about include/exclude From 11fe427e34cae391c0cd7ff7b9f3900c384f0812 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 1 Feb 2024 17:44:54 +0800 Subject: [PATCH 5/8] chore: fix chain id --- packages/runtime/plugin-garfish/src/cli/index.ts | 2 +- .../src/builder/shared/builderPlugins/adapterSSR.ts | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/runtime/plugin-garfish/src/cli/index.ts b/packages/runtime/plugin-garfish/src/cli/index.ts index f13e0472af99..abf013c46ee2 100644 --- a/packages/runtime/plugin-garfish/src/cli/index.ts +++ b/packages/runtime/plugin-garfish/src/cli/index.ts @@ -143,7 +143,7 @@ export const garfishPlugin = ({ // add comments avoid sourcemap abnormal if (bundler.BannerPlugin) { chain - .plugin(CHAIN_ID.PLUGIN.BANNER) + .plugin('garfish-banner') .use(bundler.BannerPlugin, [{ banner: 'Micro front-end' }]); } // eslint-disable-next-line react-hooks/rules-of-hooks diff --git a/packages/solutions/app-tools/src/builder/shared/builderPlugins/adapterSSR.ts b/packages/solutions/app-tools/src/builder/shared/builderPlugins/adapterSSR.ts index 6a18e4e66cca..f297c35ff16c 100644 --- a/packages/solutions/app-tools/src/builder/shared/builderPlugins/adapterSSR.ts +++ b/packages/solutions/app-tools/src/builder/shared/builderPlugins/adapterSSR.ts @@ -1,6 +1,5 @@ import * as path from 'path'; import { - ChainIdentifier, isHtmlDisabled, RsbuildPlugin, BundlerChain, @@ -39,7 +38,7 @@ export const builderPluginAdapterSSR = ( api.modifyBundlerChain( async ( chain, - { target, CHAIN_ID, isProd, HtmlPlugin: HtmlBundlerPlugin, isServer }, + { target, isProd, HtmlPlugin: HtmlBundlerPlugin, isServer }, ) => { const builderConfig = api.getNormalizedConfig(); const { normalizedConfig } = options; @@ -62,7 +61,6 @@ export const builderPluginAdapterSSR = ( applyAsyncChunkHtmlPlugin({ chain, modernConfig: options.normalizedConfig, - CHAIN_ID, HtmlBundlerPlugin, }); } @@ -97,17 +95,15 @@ const isStreamingSSR = (userConfig: AppNormalizedConfig<'shared'>): boolean => { function applyAsyncChunkHtmlPlugin({ chain, modernConfig, - CHAIN_ID, HtmlBundlerPlugin, }: { chain: BundlerChain; modernConfig: AppNormalizedConfig<'shared'>; - CHAIN_ID: ChainIdentifier; HtmlBundlerPlugin: any; }) { if (isStreamingSSR(modernConfig)) { chain - .plugin(CHAIN_ID.PLUGIN.HTML_ASYNC_CHUNK) + .plugin('html-async-chunk') .use(HtmlAsyncChunkPlugin, [HtmlBundlerPlugin]); } } From 2c86e4590711b8c0b1b4916e063dcd8295ce5b27 Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 7 Feb 2024 14:57:26 +0800 Subject: [PATCH 6/8] feat: bump deps --- .../builder-webpack-provider/package.json | 2 +- packages/builder/builder/package.json | 2 +- packages/builder/uni-builder/package.json | 36 +- .../src/rspack/plugins/babel-post.ts | 6 +- .../src/shared/parseCommonConfig.ts | 14 +- .../uni-builder/src/shared/plugins/arco.ts | 7 +- .../src/shared/plugins/splitChunk.ts | 8 +- packages/builder/uni-builder/src/types.ts | 8 + .../uni-builder/src/webpack/plugins/babel.ts | 6 +- packages/cli/plugin-swc/package.json | 2 +- packages/devtools/client/package.json | 2 +- packages/devtools/plugin/src/rpc/index.ts | 2 +- .../review/eslint-config-app/package.json | 2 +- packages/runtime/plugin-testing/package.json | 2 +- packages/server/server/package.json | 2 +- packages/server/utils/package.json | 2 +- packages/solutions/app-tools/package.json | 8 +- pnpm-lock.yaml | 471 +++++++++++------- tests/e2e/builder/package.json | 4 +- 19 files changed, 361 insertions(+), 225 deletions(-) diff --git a/packages/builder/builder-webpack-provider/package.json b/packages/builder/builder-webpack-provider/package.json index 77d88dadd274..73a5578fa15e 100644 --- a/packages/builder/builder-webpack-provider/package.json +++ b/packages/builder/builder-webpack-provider/package.json @@ -96,7 +96,7 @@ "@modern-js/types": "workspace:*", "@modern-js/utils": "workspace:*", "@pmmmwh/react-refresh-webpack-plugin": "0.5.10", - "@rsbuild/babel-preset": "0.3.7", + "@rsbuild/babel-preset": "0.4.0", "@swc/helpers": "0.5.3", "babel-plugin-import": "1.13.5", "babel-plugin-styled-components": "1.13.3", diff --git a/packages/builder/builder/package.json b/packages/builder/builder/package.json index 5570befa6c63..04d6460a3987 100644 --- a/packages/builder/builder/package.json +++ b/packages/builder/builder/package.json @@ -62,7 +62,7 @@ "dependencies": { "@modern-js/builder-shared": "workspace:*", "@modern-js/utils": "workspace:*", - "@rsbuild/monorepo-utils": "0.3.7", + "@rsbuild/monorepo-utils": "0.4.0", "@svgr/webpack": "8.1.0", "@swc/helpers": "0.5.3", "deepmerge": "^4.3.1", diff --git a/packages/builder/uni-builder/package.json b/packages/builder/uni-builder/package.json index 3f57ab0a6d6c..4114f018d6b7 100644 --- a/packages/builder/uni-builder/package.json +++ b/packages/builder/uni-builder/package.json @@ -35,23 +35,23 @@ "@modern-js/server": "workspace:*", "@modern-js/prod-server": "workspace:*", "@pmmmwh/react-refresh-webpack-plugin": "0.5.10", - "@rsbuild/babel-preset": "0.3.7", - "@rsbuild/core": "0.3.7", - "@rsbuild/plugin-assets-retry": "0.3.7", - "@rsbuild/plugin-babel": "0.3.7", - "@rsbuild/plugin-check-syntax": "0.3.7", - "@rsbuild/plugin-css-minimizer": "0.3.7", - "@rsbuild/plugin-pug": "0.3.7", - "@rsbuild/plugin-react": "0.3.7", - "@rsbuild/plugin-rem": "0.3.7", - "@rsbuild/plugin-source-build": "0.3.7", - "@rsbuild/plugin-styled-components": "0.3.7", - "@rsbuild/plugin-svgr": "0.3.7", - "@rsbuild/plugin-type-check": "0.3.7", - "@rsbuild/plugin-toml": "0.3.7", - "@rsbuild/plugin-yaml": "0.3.7", - "@rsbuild/shared": "0.3.7", - "@rsbuild/webpack": "0.3.7", + "@rsbuild/babel-preset": "0.4.0", + "@rsbuild/core": "0.4.0", + "@rsbuild/plugin-assets-retry": "0.4.0", + "@rsbuild/plugin-babel": "0.4.0", + "@rsbuild/plugin-check-syntax": "0.4.0", + "@rsbuild/plugin-css-minimizer": "0.4.0", + "@rsbuild/plugin-pug": "0.4.0", + "@rsbuild/plugin-react": "0.4.0", + "@rsbuild/plugin-rem": "0.4.0", + "@rsbuild/plugin-source-build": "0.4.0", + "@rsbuild/plugin-styled-components": "0.4.0", + "@rsbuild/plugin-svgr": "0.4.0", + "@rsbuild/plugin-type-check": "0.4.0", + "@rsbuild/plugin-toml": "0.4.0", + "@rsbuild/plugin-yaml": "0.4.0", + "@rsbuild/shared": "0.4.0", + "@rsbuild/webpack": "0.4.0", "@swc/helpers": "0.5.3", "babel-loader": "9.1.3", "babel-plugin-import": "1.13.5", @@ -76,7 +76,7 @@ }, "devDependencies": { "@modern-js/builder-plugin-node-polyfill": "workspace:*", - "@rsbuild/plugin-swc": "0.3.7", + "@rsbuild/plugin-swc": "0.4.0", "@scripts/build": "workspace:*", "@scripts/vitest-config": "workspace:*", "@types/lodash": "^4.14.202", diff --git a/packages/builder/uni-builder/src/rspack/plugins/babel-post.ts b/packages/builder/uni-builder/src/rspack/plugins/babel-post.ts index fdec8fc98ca2..add98d4f5f54 100644 --- a/packages/builder/uni-builder/src/rspack/plugins/babel-post.ts +++ b/packages/builder/uni-builder/src/rspack/plugins/babel-post.ts @@ -17,10 +17,14 @@ export const pluginBabelPost = (): RsbuildPlugin => ({ .rule(CHAIN_ID.RULE.JS) .use(CHAIN_ID.USE.BABEL) .get('options'); + const config = api.getNormalizedConfig(); if ( babelLoaderOptions && - lodash.isEqual(getDefaultBabelOptions(), babelLoaderOptions) + lodash.isEqual( + getDefaultBabelOptions(config.source.decorators), + babelLoaderOptions, + ) ) { chain.module.rule(CHAIN_ID.RULE.JS).uses.delete(CHAIN_ID.USE.BABEL); } diff --git a/packages/builder/uni-builder/src/shared/parseCommonConfig.ts b/packages/builder/uni-builder/src/shared/parseCommonConfig.ts index 819894787bf0..6e187bcbb1fd 100644 --- a/packages/builder/uni-builder/src/shared/parseCommonConfig.ts +++ b/packages/builder/uni-builder/src/shared/parseCommonConfig.ts @@ -119,6 +119,8 @@ export async function parseCommonConfig( plugins: [...plugins] = [], performance: { ...performanceConfig } = {}, output: { + disableFilenameHash, + enableLatestDecorators, cssModuleLocalIdentName, enableInlineScripts, disableCssExtract, @@ -169,7 +171,13 @@ export async function parseCommonConfig( security: securityConfig, }; - const { dev = {}, html = {}, output = {} } = rsbuildConfig; + const { dev = {}, html = {}, output = {}, source = {} } = rsbuildConfig; + + if (enableLatestDecorators) { + source.decorators = { + version: '2022-03', + }; + } if (cssModuleLocalIdentName) { output.cssModules ||= {}; @@ -221,6 +229,10 @@ export async function parseCommonConfig( output.inlineStyles = enableInlineStyles; } + if (disableFilenameHash !== undefined) { + output.filenameHash = !disableFilenameHash; + } + const extraConfig: RsbuildConfig = {}; extraConfig.html ||= {}; diff --git a/packages/builder/uni-builder/src/shared/plugins/arco.ts b/packages/builder/uni-builder/src/shared/plugins/arco.ts index 47851215ae6c..4283ffbfcd95 100644 --- a/packages/builder/uni-builder/src/shared/plugins/arco.ts +++ b/packages/builder/uni-builder/src/shared/plugins/arco.ts @@ -1,8 +1,5 @@ -import { - isServerTarget, - isPackageInstalled, - type RsbuildPlugin, -} from '@rsbuild/shared'; +import { isServerTarget, type RsbuildPlugin } from '@rsbuild/shared'; +import { isPackageInstalled } from '@modern-js/utils'; export const pluginArco = (): RsbuildPlugin => ({ name: 'uni-builder:arco', diff --git a/packages/builder/uni-builder/src/shared/plugins/splitChunk.ts b/packages/builder/uni-builder/src/shared/plugins/splitChunk.ts index 99ef0b8ba4f3..2e67278f0615 100644 --- a/packages/builder/uni-builder/src/shared/plugins/splitChunk.ts +++ b/packages/builder/uni-builder/src/shared/plugins/splitChunk.ts @@ -1,9 +1,5 @@ -import { - isPlainObject, - isPackageInstalled, - createCacheGroups, - type SplitChunks, -} from '@rsbuild/shared'; +import { createCacheGroups, type SplitChunks } from '@rsbuild/shared'; +import { isPlainObject, isPackageInstalled } from '@modern-js/utils'; import type { RsbuildPlugin } from '@rsbuild/core'; export const pluginSplitChunks = (): RsbuildPlugin => ({ diff --git a/packages/builder/uni-builder/src/types.ts b/packages/builder/uni-builder/src/types.ts index 36a0295bd9ad..e720e2651695 100644 --- a/packages/builder/uni-builder/src/types.ts +++ b/packages/builder/uni-builder/src/types.ts @@ -151,6 +151,14 @@ export type UniBuilderExtraConfig = { resolveExtensionPrefix?: string | Partial>; }; output?: { + /** + * @deprecated use `output.filenameHash` instead + */ + disableFilenameHash?: boolean; + /** + * @deprecated use `source.decorators` instead + */ + enableLatestDecorators?: boolean; /** * @deprecated use `output.cssModules.localIdentName` instead */ diff --git a/packages/builder/uni-builder/src/webpack/plugins/babel.ts b/packages/builder/uni-builder/src/webpack/plugins/babel.ts index 6c6fdf3efd70..2c77cfb20191 100644 --- a/packages/builder/uni-builder/src/webpack/plugins/babel.ts +++ b/packages/builder/uni-builder/src/webpack/plugins/babel.ts @@ -83,11 +83,7 @@ export const pluginBabel = (options?: PluginBabelOptions): RsbuildPlugin => ({ }, }; - const decoratorConfig = { - version: config.output.enableLatestDecorators - ? '2018-09' - : 'legacy', - } as const; + const decoratorConfig = config.source.decorators; const baseBabelConfig = isServer || isServiceWorker diff --git a/packages/cli/plugin-swc/package.json b/packages/cli/plugin-swc/package.json index fdb385e19854..f2b0e6a7b119 100644 --- a/packages/cli/plugin-swc/package.json +++ b/packages/cli/plugin-swc/package.json @@ -37,7 +37,7 @@ "test": "jest" }, "dependencies": { - "@rsbuild/plugin-swc": "0.3.7", + "@rsbuild/plugin-swc": "0.4.0", "@modern-js/utils": "workspace:*", "@swc/helpers": "0.5.3" }, diff --git a/packages/devtools/client/package.json b/packages/devtools/client/package.json index 5c563eeeb9af..a935b951a195 100644 --- a/packages/devtools/client/package.json +++ b/packages/devtools/client/package.json @@ -42,7 +42,7 @@ "@radix-ui/react-popover": "^1.0.7", "@radix-ui/react-tabs": "^1.0.4", "@radix-ui/themes": "^2.0.0", - "@rsbuild/core": "0.3.7", + "@rsbuild/core": "0.4.0", "@types/jest": "^29", "@types/lodash": "^4.14.202", "@types/node": "~16.11.7", diff --git a/packages/devtools/plugin/src/rpc/index.ts b/packages/devtools/plugin/src/rpc/index.ts index be240cce8e1e..ec2dd3a883f0 100644 --- a/packages/devtools/plugin/src/rpc/index.ts +++ b/packages/devtools/plugin/src/rpc/index.ts @@ -193,7 +193,7 @@ export const setupClientConnection = async ( : api.modifyRspackConfig; const expectBundlerNum = _.castArray(api.context.targets).length; const bundlerConfigs: JsonValue[] = []; - modifyBundlerConfig(config => { + modifyBundlerConfig((config: any) => { bundlerConfigs.push(config as JsonValue); if (bundlerConfigs.length >= expectBundlerNum) { deferred.bundler.config.resolved.resolve( diff --git a/packages/review/eslint-config-app/package.json b/packages/review/eslint-config-app/package.json index 9d8fbdba2ff5..8c91b240f8bf 100644 --- a/packages/review/eslint-config-app/package.json +++ b/packages/review/eslint-config-app/package.json @@ -25,7 +25,7 @@ "@babel/core": "^7.23.2", "@babel/eslint-parser": "^7.22.15", "@babel/eslint-plugin": "^7.22.10", - "@rsbuild/babel-preset": "0.3.7", + "@rsbuild/babel-preset": "0.4.0", "@typescript-eslint/eslint-plugin": "^5.59.0", "@typescript-eslint/parser": "^5.59.0", "eslint": "^8.28.0", diff --git a/packages/runtime/plugin-testing/package.json b/packages/runtime/plugin-testing/package.json index acb1ce575bb2..b43deaab73dc 100644 --- a/packages/runtime/plugin-testing/package.json +++ b/packages/runtime/plugin-testing/package.json @@ -128,7 +128,7 @@ "@modern-js/plugin": "workspace:*", "@modern-js/prod-server": "workspace:*", "@modern-js/types": "workspace:*", - "@rsbuild/babel-preset": "0.3.7", + "@rsbuild/babel-preset": "0.4.0", "@testing-library/jest-dom": "^5.16.1", "@testing-library/react": "^13.4.0", "@types/testing-library__jest-dom": "^5.14.3", diff --git a/packages/server/server/package.json b/packages/server/server/package.json index 9d0547f83f37..a67363636d6a 100644 --- a/packages/server/server/package.json +++ b/packages/server/server/package.json @@ -62,7 +62,7 @@ "axios": "^1.6.0" }, "devDependencies": { - "@rsbuild/shared": "0.3.7", + "@rsbuild/shared": "0.4.0", "@modern-js/server-core": "workspace:*", "@scripts/build": "workspace:*", "@scripts/jest-config": "workspace:*", diff --git a/packages/server/utils/package.json b/packages/server/utils/package.json index f4da87308957..19566d770e1a 100644 --- a/packages/server/utils/package.json +++ b/packages/server/utils/package.json @@ -46,7 +46,7 @@ "@modern-js/babel-compiler": "workspace:*", "@modern-js/utils": "workspace:*", "@modern-js/babel-plugin-module-resolver": "workspace:*", - "@rsbuild/babel-preset": "0.3.7", + "@rsbuild/babel-preset": "0.4.0", "@swc/helpers": "0.5.3", "babel-plugin-transform-typescript-metadata": "^0.3.2" }, diff --git a/packages/solutions/app-tools/package.json b/packages/solutions/app-tools/package.json index 43c9d65170a5..33faecf1b1da 100644 --- a/packages/solutions/app-tools/package.json +++ b/packages/solutions/app-tools/package.json @@ -90,16 +90,16 @@ "@modern-js/types": "workspace:*", "@modern-js/upgrade": "workspace:*", "@modern-js/utils": "workspace:*", - "@rsbuild/plugin-esbuild": "0.3.7", - "@rsbuild/plugin-node-polyfill": "0.3.7", - "@rsbuild/shared": "0.3.7", + "@rsbuild/plugin-esbuild": "0.4.0", + "@rsbuild/plugin-node-polyfill": "0.4.0", + "@rsbuild/shared": "0.4.0", "es-module-lexer": "^1.1.0", "esbuild": "0.17.19", "@swc/helpers": "0.5.3", "@modern-js/server-core": "workspace:*" }, "devDependencies": { - "@rsbuild/plugin-swc": "0.3.7", + "@rsbuild/plugin-swc": "0.4.0", "@scripts/build": "workspace:*", "@scripts/jest-config": "workspace:*", "@types/babel__traverse": "7.18.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8b567c8e05ce..9407d8bf3980 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -91,8 +91,8 @@ importers: specifier: workspace:* version: link:../../toolkit/utils '@rsbuild/monorepo-utils': - specifier: 0.3.7 - version: 0.3.7(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0(@swc/helpers@0.5.3) '@svgr/webpack': specifier: 8.1.0 version: 8.1.0(typescript@5.3.3) @@ -331,8 +331,8 @@ importers: specifier: 0.5.10 version: 0.5.10(react-refresh@0.14.0)(webpack@5.89.0) '@rsbuild/babel-preset': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0 '@swc/helpers': specifier: 0.5.3 version: 0.5.3 @@ -649,56 +649,56 @@ importers: specifier: 0.5.10 version: 0.5.10(react-refresh@0.14.0)(webpack@5.89.0) '@rsbuild/babel-preset': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0 '@rsbuild/core': - specifier: 0.3.7 - version: 0.3.7 + specifier: 0.4.0 + version: 0.4.0 '@rsbuild/plugin-assets-retry': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3) '@rsbuild/plugin-babel': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3) '@rsbuild/plugin-check-syntax': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3) '@rsbuild/plugin-css-minimizer': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3)(esbuild@0.17.19)(webpack@5.89.0) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3)(esbuild@0.17.19)(webpack@5.89.0) '@rsbuild/plugin-pug': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3) '@rsbuild/plugin-react': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3) '@rsbuild/plugin-rem': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3) '@rsbuild/plugin-source-build': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3) '@rsbuild/plugin-styled-components': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3) '@rsbuild/plugin-svgr': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3)(typescript@5.3.3) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3)(typescript@5.3.3) '@rsbuild/plugin-toml': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3) '@rsbuild/plugin-type-check': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3)(typescript@5.3.3)(webpack@5.89.0) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3)(typescript@5.3.3)(webpack@5.89.0) '@rsbuild/plugin-yaml': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3) '@rsbuild/shared': - specifier: 0.3.7 - version: 0.3.7(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0(@swc/helpers@0.5.3) '@rsbuild/webpack': - specifier: 0.3.7 - version: 0.3.7(@swc/helpers@0.5.3)(esbuild@0.17.19) + specifier: 0.4.0 + version: 0.4.0(@swc/helpers@0.5.3)(esbuild@0.17.19) '@swc/helpers': specifier: 0.5.3 version: 0.5.3 @@ -767,8 +767,8 @@ importers: specifier: workspace:* version: link:../plugin-node-polyfill '@rsbuild/plugin-swc': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0) '@scripts/build': specifier: workspace:* version: link:../../../scripts/build @@ -1244,8 +1244,8 @@ importers: specifier: workspace:* version: link:../../toolkit/utils '@rsbuild/plugin-swc': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0) '@swc/helpers': specifier: 0.5.3 version: 0.5.3 @@ -1378,8 +1378,8 @@ importers: specifier: ^2.0.0 version: 2.0.0(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0) '@rsbuild/core': - specifier: 0.3.7 - version: 0.3.7 + specifier: 0.4.0 + version: 0.4.0 '@scripts/jest-config': specifier: workspace:* version: link:../../../scripts/jest-config @@ -3274,8 +3274,8 @@ importers: specifier: ^7.22.10 version: 7.22.10(@babel/eslint-parser@7.22.15)(eslint@8.28.0) '@rsbuild/babel-preset': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0 '@typescript-eslint/eslint-plugin': specifier: ^5.59.0 version: 5.59.6(@typescript-eslint/parser@5.59.6)(eslint@8.28.0)(typescript@5.3.3) @@ -3685,8 +3685,8 @@ importers: specifier: workspace:* version: link:../../toolkit/utils '@rsbuild/babel-preset': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0 '@swc/helpers': specifier: 0.5.3 version: 0.5.3 @@ -4448,8 +4448,8 @@ importers: specifier: workspace:* version: link:../core '@rsbuild/shared': - specifier: 0.3.7 - version: 0.3.7(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0(@swc/helpers@0.5.3) '@scripts/build': specifier: workspace:* version: link:../../../scripts/build @@ -4520,8 +4520,8 @@ importers: specifier: workspace:* version: link:../../toolkit/utils '@rsbuild/babel-preset': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0 '@swc/helpers': specifier: 0.5.3 version: 0.5.3 @@ -4614,14 +4614,14 @@ importers: specifier: workspace:* version: link:../../toolkit/utils '@rsbuild/plugin-esbuild': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3) '@rsbuild/plugin-node-polyfill': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3) '@rsbuild/shared': - specifier: 0.3.7 - version: 0.3.7(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0(@swc/helpers@0.5.3) '@swc/helpers': specifier: 0.5.3 version: 0.5.3 @@ -4633,8 +4633,8 @@ importers: version: 0.17.19 devDependencies: '@rsbuild/plugin-swc': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0) '@scripts/build': specifier: workspace:* version: link:../../../scripts/build @@ -5965,11 +5965,11 @@ importers: specifier: 1.33.0 version: 1.33.0 '@rsbuild/plugin-swc': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7) + specifier: 0.4.0 + version: 0.4.0(@rsbuild/core@0.4.0) '@rsbuild/shared': - specifier: 0.3.7 - version: 0.3.7(@swc/helpers@0.5.3) + specifier: 0.4.0 + version: 0.4.0(@swc/helpers@0.5.3) '@types/lodash': specifier: ^4.14.202 version: 4.14.202 @@ -14277,8 +14277,8 @@ packages: rollup: 3.29.4 dev: true - /@rsbuild/babel-preset@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-GeKUdQRZFNzfoRw0tDRyabtKsgj3SXP0tqE/2spmedUriP8W6m5ywbaWwsyiBV6VU/fMljnvk4xlGzcdSfDGgg==} + /@rsbuild/babel-preset@0.4.0: + resolution: {integrity: sha512-e0LuLKXx5X5OiUgeIgEPiFtW/c+vV+eFkj9GJ88mGIQe210Y+K8OmHrYcJ3zrVN9LH12adOtRqNLiUTFXukROw==} dependencies: '@babel/core': 7.23.6 '@babel/plugin-proposal-decorators': 7.23.6(@babel/core@7.23.6) @@ -14290,14 +14290,10 @@ packages: '@babel/preset-typescript': 7.23.2(@babel/core@7.23.6) '@babel/runtime': 7.23.2 '@babel/types': 7.23.6 - '@rsbuild/plugin-babel': 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) '@types/babel__core': 7.20.3 babel-plugin-dynamic-import-node: 2.3.3 core-js: 3.32.2 transitivePeerDependencies: - - '@rsbuild/core' - - '@swc/helpers' - supports-color dev: false @@ -14314,48 +14310,49 @@ packages: postcss: 8.4.31 dev: true - /@rsbuild/core@0.3.7: - resolution: {integrity: sha512-3CECaT33x0m+tnnvdSMmNkRUn5D0hrd2lSBklmyBKwTASKT8xlhHNWOTFbrOlG4PByjPRCO4PoykZa5OOVvXMA==} + /@rsbuild/core@0.4.0: + resolution: {integrity: sha512-AHz7yMsR0OAsrU3Mqbx0dsBTspV+95ZXaOjjCJYFENSrXnftfcvWy+SOsyKgvz6gHIeOraNKXFuYwXSdd+ImuA==} engines: {node: '>=14.0.0'} hasBin: true dependencies: - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) - '@rspack/core': 0.5.0(@swc/helpers@0.5.3) + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) + '@rspack/core': 0.5.3(@swc/helpers@0.5.3) '@swc/helpers': 0.5.3 core-js: 3.32.2 html-webpack-plugin: /html-rspack-plugin@5.5.7 postcss: 8.4.33 - /@rsbuild/monorepo-utils@0.3.7(@swc/helpers@0.5.3): - resolution: {integrity: sha512-sLsvvHTbAf3eaYR8wpc+88s0a13RR+WTa2SEML2BS1865BoHpkaURIDaVbLfIO3FWR6uap8WV5Eazl5fxwb3yQ==} + /@rsbuild/monorepo-utils@0.4.0(@swc/helpers@0.5.3): + resolution: {integrity: sha512-IgkKuqMHWAex75OjPG+v1YMiRFbKmbbjIQeE4T03Z1+1U7XTEKEbVOTytCAbKKinUx7YV8nDR17qatDU0TjEIA==} dependencies: - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) fast-glob: 3.3.2 transitivePeerDependencies: - '@swc/helpers' dev: false - /@rsbuild/plugin-assets-retry@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-7Gpj6m18XQf+8BdLF0s5QD7DLYyLac8j1EuOzktSjL+UNFmTBrvkP3csEPSFcr2/n28YbC3CR31ZUVhtBwy0YA==} + /@rsbuild/plugin-assets-retry@0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-dDPtaIn9+YFcZh5NYBIkQXhZXuxACcYT+S/Y8qsmWoYa3C9EK0qlBgv38jj7lBgzKyL++hURnh9ntgpJmR2StA==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.4.0 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.4.0 + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) serialize-javascript: 6.0.1 transitivePeerDependencies: - '@swc/helpers' dev: false - /@rsbuild/plugin-babel@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-L4ORUCTmy3rv5elWrG04EyaOYea24BnRn5jp9aA0zHgraFVf/YAk430Cxa2qX7G8pWZtAHHRGE06ey3b1eCwBA==} + /@rsbuild/plugin-babel@0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-7/3PCFJ463LcaLtkYpAPhDeZtKSXwjKSpB2eZ398GI5LPFwq489CFoLi8USR9qixYrx9mwr50ZafgB4wCxAWTA==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.4.0 dependencies: '@babel/core': 7.23.6 + '@babel/plugin-proposal-decorators': 7.23.6(@babel/core@7.23.6) '@babel/preset-typescript': 7.23.2(@babel/core@7.23.6) - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.4.0 + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) '@types/babel__core': 7.20.3 upath: 2.0.1 transitivePeerDependencies: @@ -14363,28 +14360,28 @@ packages: - supports-color dev: false - /@rsbuild/plugin-check-syntax@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-jh6b4zU0TjbYb/+n3Hco3rj61kEJ46qyOC3zQo06SO3hqQp6K+mwYAHZC48vWxWarYxknJw6YRk+ndEziW5doQ==} + /@rsbuild/plugin-check-syntax@0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-omO3KYs3bjM2LfVTdgzNWx2SgKR+BQRxt1G0PRUxbxlhtSQ50cIzNyxQeW18dTKv6/6hiqqtxNsroJeLmY8AUA==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.4.0 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.4.0 + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) acorn: 8.11.2 - caniuse-lite: 1.0.30001566 + caniuse-lite: 1.0.30001584 htmlparser2: 9.1.0 source-map: 0.7.4 transitivePeerDependencies: - '@swc/helpers' dev: false - /@rsbuild/plugin-css-minimizer@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3)(esbuild@0.17.19)(webpack@5.89.0): - resolution: {integrity: sha512-vbc6h3QppxJFBhbDQ9UQ6IT4ilO0kixsIgVUh+xdcHPvnDeA2hGre6Df4sd5ijTdEvnT2mddS4/w/4uYLMsp3w==} + /@rsbuild/plugin-css-minimizer@0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3)(esbuild@0.17.19)(webpack@5.89.0): + resolution: {integrity: sha512-TYyVTuDnpcKWj2d1gTz2PnX3LEuftXlQilwe+bavDyxAJ/U1uF1Jg9Cn4NMdVc3LHKEzK/6MR5nFPorDX8kH1g==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.4.0 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.4.0 + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) css-minimizer-webpack-plugin: 5.0.1(esbuild@0.17.19)(webpack@5.89.0) transitivePeerDependencies: - '@parcel/css' @@ -14397,13 +14394,13 @@ packages: - webpack dev: false - /@rsbuild/plugin-esbuild@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-hQE/Dzp6WV58yCIU/BvjBoZpFMFwZ1kE22BpgHM1vvzv2DT0g++3vyUUoucsLWbsJpxluWnt1wS1sj5h+/dx6g==} + /@rsbuild/plugin-esbuild@0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-d88fV5wVKqVb7UBGLn4Yq2GzLV9jbkrsPY+Tdv8CkJoTCTJ0QOZgoswdanBIVQAVl5Yk5rTuLfYfLvRlxbtNsQ==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.4.0 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.4.0 + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) esbuild: 0.17.19 webpack: 5.89.0(esbuild@0.17.19) transitivePeerDependencies: @@ -14413,13 +14410,13 @@ packages: - webpack-cli dev: false - /@rsbuild/plugin-node-polyfill@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-duck7P6dJPCIiTzzSekieA26skDX5//ECy3UAkZNis78Qh13Wr2+DEHiQ5BrFyptssuDCtjoA5x+791BU5N51Q==} + /@rsbuild/plugin-node-polyfill@0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-UIEhU4fi2GOYTeMURxhI0/32mk5ekPitUngnVeDnOzs72R3zd1+xSAOFgDYdIka4CVW1idUK+gCkSUhk1SRw6w==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.4.0 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.4.0 + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) assert: 2.1.0 browserify-zlib: 0.2.0 buffer: 5.7.1 @@ -14447,13 +14444,13 @@ packages: - '@swc/helpers' dev: false - /@rsbuild/plugin-pug@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-58r6gLsWN6SNqSV8+BpqDsOVn9LO0Vq51XMO4Q/ruSLJBdJEAw/o86XA4Ua36nKFJ7mn7rwxQewEbjd65dL1uQ==} + /@rsbuild/plugin-pug@0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-pbaMeB42aAtmwaGoIFfVk3C+KZ61RMC4e1EHC1dy+Ady3QB+2yExunSfEYz9ovbBDxE0dpKc0vUA0GGhYnDTWQ==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.4.0 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.4.0 + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) '@types/pug': 2.0.10 pug: 3.0.2 transitivePeerDependencies: @@ -14470,49 +14467,49 @@ packages: - '@swc/helpers' dev: true - /@rsbuild/plugin-react@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-vKjVMZBHp1EEodVsPW5E9cOaA7UvnXxK7ACjWRvuRlMK54VUkYE/npzB2QAxXU3bKK2KiYOH78YYpiHyz1mkFQ==} + /@rsbuild/plugin-react@0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-zbvNBLRynsL8u3rORHKU92bSPTb4BsTuX20qJyTV9fQ0OsO8T1PvnQoHkKLVNIrCZdiC8AZc3NU2UqbHzUIY7w==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.4.0 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) - '@rspack/plugin-react-refresh': 0.5.0(react-refresh@0.14.0) + '@rsbuild/core': 0.4.0 + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) + '@rspack/plugin-react-refresh': 0.5.3(react-refresh@0.14.0) react-refresh: 0.14.0 transitivePeerDependencies: - '@swc/helpers' - /@rsbuild/plugin-rem@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-72QsjLpDaIN4lA4KlgNVy9KLL1wvFEp9CNl69qtYmJLhFqSMlVBM8a+NEditw4gAokmYBL0abgxqkbEZd+pa2A==} + /@rsbuild/plugin-rem@0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-0/9PxlPlXWnEKCQd/yEk/3T/W58Lx1Gv7m1IQDj/Ykp5JqE59FbbdMRlZ6qQTlWgJvr1MCNGmsKgot4dOPvTgw==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.4.0 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.4.0 + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) terser: 5.27.0 transitivePeerDependencies: - '@swc/helpers' dev: false - /@rsbuild/plugin-source-build@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-WtKgwDjpoxzSyuhwiVao86d/L9mDILfLXmNPQ4pHC3ZlJAwCMpQImyG3mfGR18q+V7svdUpdht8E58JcAeeA6A==} + /@rsbuild/plugin-source-build@0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-eLnPqK7HRkbBrEE8SzzvoRrLp634o+kt0X3l/J/Axl8lLRcSR8dPFwP+X8EhphduRmitlxIHwLVHpYu1gkiCYQ==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.4.0 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/monorepo-utils': 0.3.7(@swc/helpers@0.5.3) - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.4.0 + '@rsbuild/monorepo-utils': 0.4.0(@swc/helpers@0.5.3) + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) transitivePeerDependencies: - '@swc/helpers' dev: false - /@rsbuild/plugin-styled-components@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-HTdiTdHbkC7LOqZDoxpy0UhOWDUX72fYlse+AnaRUKEl+v95XnJaXKjbbFuhF6GKsXzKp/TlEkvoePTO1mz4qw==} + /@rsbuild/plugin-styled-components@0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-N4oxdriEV8LaMkG8++ub3B1aZCA4T+5EJsC7C31l/uSkk2q4VYzLyCwvNjwWe6jX9evxaoi64VQSlgjFP1+sNg==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.4.0 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.4.0 + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) transitivePeerDependencies: - '@swc/helpers' dev: false @@ -14530,14 +14527,14 @@ packages: - typescript dev: true - /@rsbuild/plugin-svgr@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3)(typescript@5.3.3): - resolution: {integrity: sha512-35jIEhV8uWRUmPEIsZn86fkjLrD3eCKniiij0ZpES8+1fC4zpXxz0b60S0S8zNhkVM+K3RtuFYYIyG6xv+hPCQ==} + /@rsbuild/plugin-svgr@0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3)(typescript@5.3.3): + resolution: {integrity: sha512-4LxjnzHNnXk3fz4Y5U+QmVY26KX7f8W8n8Pauxw1RHev5Xq9qBwRSPjs10IfA0gyy7xBKocA/O8kON8AeCbkyw==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.4.0 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/plugin-react': 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.4.0 + '@rsbuild/plugin-react': 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3) + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) '@svgr/core': 8.1.0(typescript@5.3.3) '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0) '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0)(typescript@5.3.3) @@ -14547,37 +14544,37 @@ packages: - typescript dev: false - /@rsbuild/plugin-swc@0.3.7(@rsbuild/core@0.3.7): - resolution: {integrity: sha512-i7TNGlwXE0EVwekxcgoMadsejI6hEwoQM86DumsnBhaJ+/KYDmYl1wfH6X16XB0NnVNFG0nj4O3dPJATz9lz8Q==} + /@rsbuild/plugin-swc@0.4.0(@rsbuild/core@0.4.0): + resolution: {integrity: sha512-ENT7d+FJltbrPuVkLkIjS+o00ayZIZj6TII+2RNH2V4vhTfKk3VSxPrJclxs1iTCQS3htMlJ9kBCdXitCPPC2g==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.4.0 dependencies: '@modern-js/swc-plugins': 0.6.6(@swc/helpers@0.5.3) - '@rsbuild/core': 0.3.7 - '@rsbuild/plugin-react': 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.4.0 + '@rsbuild/plugin-react': 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3) + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) '@swc/helpers': 0.5.3 core-js: 3.32.2 lodash: 4.17.21 - /@rsbuild/plugin-toml@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-/aCYF2GkBeChvzt0ydsZ4+v1t0TQhOqi8kdu0M0SB+QtOH00qnE2uCkrD44XKgYO9fxpAYW06yJLTGq+gXYoxw==} + /@rsbuild/plugin-toml@0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-sNJQySxYVJN+/c0aFCaVR6/SYdaOvkj03QmSBj4sd1i+BRFUmy9vZNEGJg1M9q+qBomqYzf6gc4mOwf5BeI2Og==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.4.0 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.4.0 + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) transitivePeerDependencies: - '@swc/helpers' dev: false - /@rsbuild/plugin-type-check@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3)(typescript@5.3.3)(webpack@5.89.0): - resolution: {integrity: sha512-8KPu56GTVTuyk9zz7xj23wmTqDltfRzRbhOrV8thaXicLGNd+uVd2Xf453pPnSp6xCNElXM7fU7gpY44HmJu6g==} + /@rsbuild/plugin-type-check@0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3)(typescript@5.3.3)(webpack@5.89.0): + resolution: {integrity: sha512-sLg3eMkKtqDWNlhxlPPFGWzqAARClPmpRkoNbWzAe0nx29X1PX9lxKBquM5M3TgSCP6yz3OiSVM/1uS3qWhBsQ==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.4.0 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.4.0 + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) fork-ts-checker-webpack-plugin: 9.0.2(typescript@5.3.3)(webpack@5.89.0) transitivePeerDependencies: - '@swc/helpers' @@ -14585,13 +14582,13 @@ packages: - webpack dev: false - /@rsbuild/plugin-yaml@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-/2BL0OfqLhzA6j0Wrowq/4lTXLyBTUHl/C4tkBKj58IV3V85zvfso6KDJa6put0lFH8wLFOMI+00UzrNo71ulA==} + /@rsbuild/plugin-yaml@0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-IJeU+uWMj3Ghtf9uj+HxJ7UC3wPmK+oon58X7oZY6h9sb5DzTqHDf5ngjlFb+4OGp0ngcqZYU8yUWHkhOuPfsQ==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.4.0 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.4.0 + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) transitivePeerDependencies: - '@swc/helpers' dev: false @@ -14607,25 +14604,24 @@ packages: - '@swc/helpers' dev: true - /@rsbuild/shared@0.3.7(@swc/helpers@0.5.3): - resolution: {integrity: sha512-XY82H5CzymyuUC3zGxTWDgKEXWXiQnt1kmPQS1T1mS6jwo8SSwTcEub+E5vtpAOn6r1tNGGHZre+7EVJtF51nQ==} + /@rsbuild/shared@0.4.0(@swc/helpers@0.5.3): + resolution: {integrity: sha512-TlElZikaX7GhnP1VtnjPuwpgOHmi+06dNk7mZLfPIEB0ksrKewCSedTFxktEa43rGrrGUz6oBAjuxWO8j/ytCA==} dependencies: - '@rspack/core': 0.5.0(@swc/helpers@0.5.3) - caniuse-lite: 1.0.30001566 - lodash: 4.17.21 + '@rspack/core': 0.5.3(@swc/helpers@0.5.3) + caniuse-lite: 1.0.30001584 postcss: 8.4.33 transitivePeerDependencies: - '@swc/helpers' - /@rsbuild/webpack@0.3.7(@swc/helpers@0.5.3)(esbuild@0.17.19): - resolution: {integrity: sha512-GP/HSftBrxPI0l3VVZ8ZudD7oUgD8iL0PRtLbowy3fkSm9Ym9z86KuUHMKNqjBNXyigWdCVj2wbjRLULynlOzg==} + /@rsbuild/webpack@0.4.0(@swc/helpers@0.5.3)(esbuild@0.17.19): + resolution: {integrity: sha512-d8yssaplF2P0GUMPmVUFrdMvRjP/nu8JoQS+/US88uowy3oWLtnINI1sCb8aFjx8d6hh4UiwHTfWf9kv/+69hg==} dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.4.0 + '@rsbuild/shared': 0.4.0(@swc/helpers@0.5.3) fast-glob: 3.3.2 globby: 11.1.0 html-webpack-plugin: /html-rspack-plugin@5.5.7 - mini-css-extract-plugin: 2.7.7(webpack@5.89.0) + mini-css-extract-plugin: 2.8.0(webpack@5.89.0) postcss: 8.4.33 terser-webpack-plugin: 5.3.10(esbuild@0.17.19)(webpack@5.89.0) tsconfig-paths-webpack-plugin: 4.1.0 @@ -14697,6 +14693,7 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: true optional: true /@rspack/binding-darwin-arm64@0.5.1: @@ -14707,6 +14704,13 @@ packages: dev: true optional: true + /@rspack/binding-darwin-arm64@0.5.3: + resolution: {integrity: sha512-IgGpPtPwwlWkViTbrGBhywohXoGXwMZGZLPLR3tRZY4oPuSo41cwkPAhf2TZtBIfHGbITrmewsck853A4g7poA==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + optional: true + /@rspack/binding-darwin-x64@0.4.5: resolution: {integrity: sha512-K5HgE4nHwVWizCr2pBLA8N3LXfn1lQCSV5sR+6xQQrVdvRJ5zBhPMwjPOzP+AdmGhrD14zz1j9mktzCvA7FUtg==} cpu: [x64] @@ -14720,6 +14724,7 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: true optional: true /@rspack/binding-darwin-x64@0.5.1: @@ -14730,6 +14735,13 @@ packages: dev: true optional: true + /@rspack/binding-darwin-x64@0.5.3: + resolution: {integrity: sha512-95lDx4+QTmuGQ3Ilo1BhM22jGHxPAMDvQzBD/4zO1cBtmXrFQuaDVRoM0hwlZDLZwGMP1sSpD5F75kWKhkOTDw==} + cpu: [x64] + os: [darwin] + requiresBuild: true + optional: true + /@rspack/binding-linux-arm64-gnu@0.4.5: resolution: {integrity: sha512-JvESc3imqKbqwal5WesxlV3ix8eIO/07XCj+pkaZWaf4nj/ui02NGtLaeLVxwc1fxHekdLc+ROQrxpdOLhQ1jw==} cpu: [arm64] @@ -14743,6 +14755,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: true optional: true /@rspack/binding-linux-arm64-gnu@0.5.1: @@ -14753,6 +14766,13 @@ packages: dev: true optional: true + /@rspack/binding-linux-arm64-gnu@0.5.3: + resolution: {integrity: sha512-7ZcsDROYK01FWJ9Nv1Oso7gC3b3aP8FLzbZA7ZWFCPEuBoFmIvCIVqs6DSmmpZW3KSw+XoVMELuEJuTjDi869g==} + cpu: [arm64] + os: [linux] + requiresBuild: true + optional: true + /@rspack/binding-linux-arm64-musl@0.4.5: resolution: {integrity: sha512-ziYGYEoLsPEyC0pEAj5clU8XOFr3+r7IExm9/sq2gp+M1as/yTzouEuzO3D8kI0xVfub1WmiEktTBlgjS13CSA==} cpu: [arm64] @@ -14766,6 +14786,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: true optional: true /@rspack/binding-linux-arm64-musl@0.5.1: @@ -14776,6 +14797,13 @@ packages: dev: true optional: true + /@rspack/binding-linux-arm64-musl@0.5.3: + resolution: {integrity: sha512-IBfVGpycRrLbyCWzokzeFIfK+yII68w1WOx2iCoR+tPUKa3M7WAZjrbVB33PHxGKXeF+xX7Lzm50hi4uTK8L6g==} + cpu: [arm64] + os: [linux] + requiresBuild: true + optional: true + /@rspack/binding-linux-x64-gnu@0.4.5: resolution: {integrity: sha512-9cXOIswpSZYhEXeuIWdsQNrgpjHTD4I3v0NPm75cL6cdBtJMHOa/qejO5mdTLzoDdE7waGZAb4uSMfrJOEkwqQ==} cpu: [x64] @@ -14789,6 +14817,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: true optional: true /@rspack/binding-linux-x64-gnu@0.5.1: @@ -14799,6 +14828,13 @@ packages: dev: true optional: true + /@rspack/binding-linux-x64-gnu@0.5.3: + resolution: {integrity: sha512-EiVsp0yaGBmnMsS1U6Z5bitl2AjiVqFN3ArdIDZLlxgpVUHaR1ObXIkVqsX/VK5Jgytv1H7iOmtOnkOqyFmxPw==} + cpu: [x64] + os: [linux] + requiresBuild: true + optional: true + /@rspack/binding-linux-x64-musl@0.4.5: resolution: {integrity: sha512-wClTj9mbVKprHIWsLEVJg+ZXT5slF93JsyAALIhAFkNMmn5z0B2NPD7+Oaii62edKMk2nS3dpoHu1JCLDmP0cw==} cpu: [x64] @@ -14812,6 +14848,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: true optional: true /@rspack/binding-linux-x64-musl@0.5.1: @@ -14822,6 +14859,13 @@ packages: dev: true optional: true + /@rspack/binding-linux-x64-musl@0.5.3: + resolution: {integrity: sha512-PZbmHZ/sFBC0W2vNNmMgeVORijAxhdkaU0QS95ltacO+bU8npcNb+01QgRzJovuhOfiT7HXDUmH7K0mrUqXpFg==} + cpu: [x64] + os: [linux] + requiresBuild: true + optional: true + /@rspack/binding-win32-arm64-msvc@0.4.5: resolution: {integrity: sha512-8LNITZqPMKO69nc8hwdcweBXcAS4yAL5W/kZ6zKeb6Ly+X5SBZk7l0WPL7lPMib/vHFkjJjp1buGhzymLU0bzA==} cpu: [arm64] @@ -14835,6 +14879,7 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true + dev: true optional: true /@rspack/binding-win32-arm64-msvc@0.5.1: @@ -14845,6 +14890,13 @@ packages: dev: true optional: true + /@rspack/binding-win32-arm64-msvc@0.5.3: + resolution: {integrity: sha512-bP1tgwQuTe0YSVpe73qEPXdt2rZGUpCUG3nFW+Ve27CJtq6btLqdcnnNEx2cAKs12ArN4H36U+BXfwJDp9/DaQ==} + cpu: [arm64] + os: [win32] + requiresBuild: true + optional: true + /@rspack/binding-win32-ia32-msvc@0.4.5: resolution: {integrity: sha512-dndiXygG1ZmSO3unuZ9Mc+7IvqBtFqwvjFZGKUdIcufFr2CjZDL/KR1zJGTmFIzwHKMV2hEH4cZpa2TwisXvGQ==} cpu: [ia32] @@ -14858,6 +14910,7 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true + dev: true optional: true /@rspack/binding-win32-ia32-msvc@0.5.1: @@ -14868,6 +14921,13 @@ packages: dev: true optional: true + /@rspack/binding-win32-ia32-msvc@0.5.3: + resolution: {integrity: sha512-XKMNgkc5ScDKzt2xFQWD7ELefaEQtm9+1/7xhftDAxAC3AQELC0NqL5qAWpgSXEgVIjCW8r7xiwX5mqEEqqiuw==} + cpu: [ia32] + os: [win32] + requiresBuild: true + optional: true + /@rspack/binding-win32-x64-msvc@0.4.5: resolution: {integrity: sha512-SEu8+pQsnGP7A0/XX5vawsccR825UCOzK5phJ8INSC7Mse8FKzkZpv2Af3PsHl2+N17M0PRgBxTghXR35PXkiw==} cpu: [x64] @@ -14881,6 +14941,7 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: true optional: true /@rspack/binding-win32-x64-msvc@0.5.1: @@ -14891,6 +14952,13 @@ packages: dev: true optional: true + /@rspack/binding-win32-x64-msvc@0.5.3: + resolution: {integrity: sha512-B0iosD3cTXErnlqnOawn4DqfrO2QaY135vKqBrbqTfm9Zr4ftbqvp39nL9Qot+1QuixZdYwwF/NqBvRoFd9nig==} + cpu: [x64] + os: [win32] + requiresBuild: true + optional: true + /@rspack/binding@0.4.5: resolution: {integrity: sha512-XmSlt9ucpfebhkWI4guPEym0F+8JZGr8UyBVAtHN2/7SQRI8TL8G1BUQGVgmc7+UKA5RM1Qfps1QmtHYzjARBQ==} optionalDependencies: @@ -14917,6 +14985,7 @@ packages: '@rspack/binding-win32-arm64-msvc': 0.5.0 '@rspack/binding-win32-ia32-msvc': 0.5.0 '@rspack/binding-win32-x64-msvc': 0.5.0 + dev: true /@rspack/binding@0.5.1: resolution: {integrity: sha512-2CMZ0oVBEgs+/v2nNzIEDqKS01Al//biWl0aDclh8ypeEIM9tkI/gvhjrovsnyib9oxsO3xCM4tCNCND+nx1CA==} @@ -14932,6 +15001,19 @@ packages: '@rspack/binding-win32-x64-msvc': 0.5.1 dev: true + /@rspack/binding@0.5.3: + resolution: {integrity: sha512-bwxjp2mvSGGgVRk1D+dwilwaSEvzhQTlhe3+f2h+cjampJpEa72jle1T4bpXTOOMM0JRq06AzUWlzoMxKn+JKA==} + optionalDependencies: + '@rspack/binding-darwin-arm64': 0.5.3 + '@rspack/binding-darwin-x64': 0.5.3 + '@rspack/binding-linux-arm64-gnu': 0.5.3 + '@rspack/binding-linux-arm64-musl': 0.5.3 + '@rspack/binding-linux-x64-gnu': 0.5.3 + '@rspack/binding-linux-x64-musl': 0.5.3 + '@rspack/binding-win32-arm64-msvc': 0.5.3 + '@rspack/binding-win32-ia32-msvc': 0.5.3 + '@rspack/binding-win32-x64-msvc': 0.5.3 + /@rspack/core@0.4.5: resolution: {integrity: sha512-X29fvCqTJH9OYN5pqa2lYP9hBLGICGVugtpTIAyLtMxC7gqvjvZkG/qisaVsjPyg4p2eB0NvmosnHkRv0GJ4sg==} engines: {node: '>=16.0.0'} @@ -14977,6 +15059,7 @@ packages: webpack-sources: 3.2.3 zod: 3.22.3 zod-validation-error: 1.3.1(zod@3.22.3) + dev: true /@rspack/core@0.5.1(@swc/helpers@0.5.3): resolution: {integrity: sha512-fsUKPhnBCV7UOE31W03GBfqp7lSRZBcRuvLwrUt1bmTAvl9SRrR0HuWhJAs4O8LvrjKgxRzXPM8Fpysqerfo4w==} @@ -15003,6 +15086,31 @@ packages: zod-validation-error: 1.3.1(zod@3.22.3) dev: true + /@rspack/core@0.5.3(@swc/helpers@0.5.3): + resolution: {integrity: sha512-/WCMUCwcduSrx0za1kVoN3Fdkf/fDK3v6fgvJeeNc+l7/mGttSROUmlVidmz7eyQuD9itr947NB5U087Y99dag==} + engines: {node: '>=16.0.0'} + peerDependencies: + '@swc/helpers': '>=0.5.1' + peerDependenciesMeta: + '@swc/helpers': + optional: true + dependencies: + '@module-federation/runtime-tools': 0.0.8 + '@rspack/binding': 0.5.3 + '@swc/helpers': 0.5.3 + browserslist: 4.22.2 + enhanced-resolve: 5.12.0 + events: 3.3.0 + graceful-fs: 4.2.10 + json-parse-even-better-errors: 3.0.0 + neo-async: 2.6.2 + tapable: 2.2.1 + terminal-link: 2.1.1 + watchpack: 2.4.0 + webpack-sources: 3.2.3 + zod: 3.22.3 + zod-validation-error: 1.3.1(zod@3.22.3) + /@rspack/plugin-html@0.4.5(@rspack/core@0.4.5): resolution: {integrity: sha512-W+m86gTwfY18Zbx/j1SHnF0qQwcvupcxn1UTCrkygVVmJhEtPXIid4DsNLMp9Igs4LBkWBeC9SU+xzF0BUkjGA==} peerDependencies: @@ -15038,6 +15146,17 @@ packages: optional: true dependencies: react-refresh: 0.14.0 + dev: true + + /@rspack/plugin-react-refresh@0.5.3(react-refresh@0.14.0): + resolution: {integrity: sha512-YdEtvfLBpbbtqUO5cxM947FjdZhsTBR3Dp8djxGS1jPUZ+gJ0tOmNI5V3MZtDC/lsiSlnnKwOAImOUSQ9yV1Fw==} + peerDependencies: + react-refresh: '>=0.10.0 <1.0.0' + peerDependenciesMeta: + react-refresh: + optional: true + dependencies: + react-refresh: 0.14.0 /@rspress/core@1.11.1(typescript@5.3.3)(webpack@5.89.0): resolution: {integrity: sha512-1lY7q1fHonJYgU4LNSJfiCOZbrIGOIjdbRLgCcn1zNDAMa+LOHPqptu5SQutO+WLCuXIeb7jM8gI9MOuxTdunA==} @@ -18825,6 +18944,9 @@ packages: /caniuse-lite@1.0.30001566: resolution: {integrity: sha512-ggIhCsTxmITBAMmK8yZjEhCO5/47jKXPu6Dha/wuCS4JePVL+3uiDEBuhu2aIoT+bqTOR8L76Ip1ARL9xYsEJA==} + /caniuse-lite@1.0.30001584: + resolution: {integrity: sha512-LOz7CCQ9M1G7OjJOF9/mzmqmj3jE/7VOmrfw6Mgs0E8cjOsbRXQJHsPBfmBOXDskXKrHLyyW3n7kpDW/4BsfpQ==} + /ccount@1.1.0: resolution: {integrity: sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==} dev: false @@ -26097,13 +26219,14 @@ packages: webpack: 5.89.0(esbuild@0.17.19) dev: false - /mini-css-extract-plugin@2.7.7(webpack@5.89.0): - resolution: {integrity: sha512-+0n11YGyRavUR3IlaOzJ0/4Il1avMvJ1VJfhWfCn24ITQXhRr1gghbhhrda6tgtNcpZaWKdSuwKq20Jb7fnlyw==} + /mini-css-extract-plugin@2.8.0(webpack@5.89.0): + resolution: {integrity: sha512-CxmUYPFcTgET1zImteG/LZOy/4T5rTojesQXkSNBiquhydn78tfbCE9sjIjnJ/UcjNjOC1bphTCCW5rrS7cXAg==} engines: {node: '>= 12.13.0'} peerDependencies: webpack: ^5.0.0 dependencies: schema-utils: 4.2.0 + tapable: 2.2.1 webpack: 5.89.0(esbuild@0.17.19) dev: false diff --git a/tests/e2e/builder/package.json b/tests/e2e/builder/package.json index de644ee6991f..bf89a066cab6 100644 --- a/tests/e2e/builder/package.json +++ b/tests/e2e/builder/package.json @@ -16,8 +16,8 @@ "vue": "^3.3.4" }, "devDependencies": { - "@rsbuild/plugin-swc": "0.3.7", - "@rsbuild/shared": "0.3.7", + "@rsbuild/plugin-swc": "0.4.0", + "@rsbuild/shared": "0.4.0", "@modern-js/uni-builder": "workspace:*", "@modern-js/e2e": "workspace:*", "@modern-js/utils": "workspace:*", From 438bddd0a66a3e06890fd69e04a8b195ac323ecf Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 7 Feb 2024 15:03:55 +0800 Subject: [PATCH 7/8] chore: fix --- packages/builder/uni-builder/package.json | 1 + .../src/shared/plugins/postcssLegacy.ts | 1 + .../tests/__snapshots__/babel.test.ts.snap | 19 +- .../tests/__snapshots__/default.test.ts.snap | 2120 +++++++++-------- .../__snapshots__/postcssLegacy.test.ts.snap | 309 +-- .../styledComponents.test.ts.snap | 2 + 6 files changed, 1257 insertions(+), 1195 deletions(-) diff --git a/packages/builder/uni-builder/package.json b/packages/builder/uni-builder/package.json index 4114f018d6b7..fe7dd5c5fd45 100644 --- a/packages/builder/uni-builder/package.json +++ b/packages/builder/uni-builder/package.json @@ -62,6 +62,7 @@ "html-webpack-plugin": "5.5.3", "lodash": "^4.17.21", "postcss-custom-properties": "13.1.5", + "postcss-flexbugs-fixes": "5.0.2", "postcss-font-variant": "5.0.0", "postcss-initial": "4.0.1", "postcss-media-minmax": "5.0.0", diff --git a/packages/builder/uni-builder/src/shared/plugins/postcssLegacy.ts b/packages/builder/uni-builder/src/shared/plugins/postcssLegacy.ts index 3a985735fccf..011c0f81b894 100644 --- a/packages/builder/uni-builder/src/shared/plugins/postcssLegacy.ts +++ b/packages/builder/uni-builder/src/shared/plugins/postcssLegacy.ts @@ -19,6 +19,7 @@ export const pluginPostcssLegacy = ( const enableCssMinify = !enableExtractCSS && isProd; const plugins = [ + require('postcss-flexbugs-fixes'), !cssSupport.customProperties && require('postcss-custom-properties'), !cssSupport.initial && require('postcss-initial'), !cssSupport.pageBreak && require('postcss-page-break'), diff --git a/packages/builder/uni-builder/tests/__snapshots__/babel.test.ts.snap b/packages/builder/uni-builder/tests/__snapshots__/babel.test.ts.snap index 765ee797900b..4c22d662eb9c 100644 --- a/packages/builder/uni-builder/tests/__snapshots__/babel.test.ts.snap +++ b/packages/builder/uni-builder/tests/__snapshots__/babel.test.ts.snap @@ -48,7 +48,7 @@ exports[`plugin-babel (rspack mode) > should not set babel-loader when babel con "decoratorMetadata": true, "legacyDecorator": true, "react": { - "development": true, + "development": false, "refresh": true, "runtime": "automatic", }, @@ -136,7 +136,7 @@ exports[`plugin-babel (rspack mode) > should set babel-loader when babel config "decoratorMetadata": true, "legacyDecorator": true, "react": { - "development": true, + "development": false, "refresh": true, "runtime": "automatic", }, @@ -178,6 +178,12 @@ exports[`plugin-babel (rspack mode) > should set babel-loader when babel config "compact": false, "configFile": false, "plugins": [ + [ + "/node_modules//@babel/plugin-proposal-decorators/lib/index.js", + { + "version": "legacy", + }, + ], [ "babel-plugin-import", { @@ -893,6 +899,9 @@ exports[`plugin-babel > should not have any pluginImport in Babel 1`] = ` "application/javascript", ], }, + "resolve": { + "fullySpecified": false, + }, "use": [ { "loader": "/node_modules//babel-loader/lib/index.js", @@ -1130,6 +1139,9 @@ exports[`plugin-babel > should not set default pluginImport for Babel 1`] = ` "application/javascript", ], }, + "resolve": { + "fullySpecified": false, + }, "use": [ { "loader": "/node_modules//babel-loader/lib/index.js", @@ -1846,6 +1858,9 @@ exports[`plugin-babel > should set proper pluginImport option in Babel 1`] = ` "application/javascript", ], }, + "resolve": { + "fullySpecified": false, + }, "use": [ { "loader": "/node_modules//babel-loader/lib/index.js", diff --git a/packages/builder/uni-builder/tests/__snapshots__/default.test.ts.snap b/packages/builder/uni-builder/tests/__snapshots__/default.test.ts.snap index 7c5d5b369b70..9486c7b45940 100644 --- a/packages/builder/uni-builder/tests/__snapshots__/default.test.ts.snap +++ b/packages/builder/uni-builder/tests/__snapshots__/default.test.ts.snap @@ -39,6 +39,156 @@ exports[`uni-builder rspack > should generator rspack config correctly 1`] = ` }, "test": /\\\\\\.m\\?js/, }, + { + "include": [ + { + "and": [ + "", + { + "not": /\\[\\\\\\\\/\\]node_modules\\[\\\\\\\\/\\]/, + }, + ], + }, + /\\\\\\.\\(\\?:ts\\|tsx\\|jsx\\|mts\\|cts\\)\\$/, + ], + "test": /\\\\\\.\\(\\?:js\\|jsx\\|mjs\\|cjs\\|ts\\|tsx\\|mts\\|cts\\)\\$/, + "type": "javascript/auto", + "use": [ + { + "loader": "builtin:swc-loader", + "options": { + "env": { + "coreJs": "3.32", + "mode": "entry", + "targets": [ + "> 0.01%", + "not dead", + "not op_mini all", + ], + }, + "isModule": "unknown", + "jsc": { + "externalHelpers": true, + "parser": { + "decorators": true, + "syntax": "typescript", + "tsx": true, + }, + "preserveAllComments": true, + "transform": { + "decoratorMetadata": true, + "legacyDecorator": true, + "react": { + "development": true, + "refresh": true, + "runtime": "automatic", + }, + }, + }, + "rspackExperiments": { + "import": [ + { + "libraryDirectory": "es", + "libraryName": "antd", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "es", + "libraryName": "@arco-design/web-react", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "react-icon", + "libraryName": "@arco-design/web-react/icon", + }, + ], + "styledComponents": { + "displayName": true, + "pure": false, + "ssr": false, + "transpileTemplateLiterals": true, + }, + }, + "sourceMaps": true, + }, + }, + ], + }, + { + "mimetype": { + "or": [ + "text/javascript", + "application/javascript", + ], + }, + "resolve": { + "fullySpecified": false, + }, + "use": [ + { + "loader": "builtin:swc-loader", + "options": { + "env": { + "coreJs": "3.32", + "mode": "entry", + "targets": [ + "> 0.01%", + "not dead", + "not op_mini all", + ], + }, + "isModule": "unknown", + "jsc": { + "externalHelpers": true, + "parser": { + "decorators": true, + "syntax": "typescript", + "tsx": true, + }, + "preserveAllComments": true, + "transform": { + "decoratorMetadata": true, + "legacyDecorator": true, + "react": { + "development": true, + "refresh": true, + "runtime": "automatic", + }, + }, + }, + "rspackExperiments": { + "import": [ + { + "libraryDirectory": "es", + "libraryName": "antd", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "es", + "libraryName": "@arco-design/web-react", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "react-icon", + "libraryName": "@arco-design/web-react/icon", + }, + ], + "styledComponents": { + "displayName": true, + "pure": false, + "ssr": false, + "transpileTemplateLiterals": true, + }, + }, + "sourceMaps": true, + }, + }, + ], + }, { "oneOf": [ { @@ -144,7 +294,6 @@ exports[`uni-builder rspack > should generator rspack config correctly 1`] = ` "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "> 0.01%", @@ -169,6 +318,7 @@ exports[`uni-builder rspack > should generator rspack config correctly 1`] = ` [Function], [Function], [Function], + [Function], ], }, "sourceMap": true, @@ -189,7 +339,6 @@ exports[`uni-builder rspack > should generator rspack config correctly 1`] = ` "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "> 0.01%", @@ -214,6 +363,7 @@ exports[`uni-builder rspack > should generator rspack config correctly 1`] = ` [Function], [Function], [Function], + [Function], ], }, "sourceMap": true, @@ -240,7 +390,6 @@ exports[`uni-builder rspack > should generator rspack config correctly 1`] = ` "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "> 0.01%", @@ -265,6 +414,7 @@ exports[`uni-builder rspack > should generator rspack config correctly 1`] = ` [Function], [Function], [Function], + [Function], ], }, "sourceMap": true, @@ -276,6 +426,9 @@ exports[`uni-builder rspack > should generator rspack config correctly 1`] = ` "implementation": "/node_modules//@rsbuild/shared/compiled/less", "lessOptions": { "javascriptEnabled": true, + "paths": [ + "node_modules", + ], }, "sourceMap": true, }, @@ -295,7 +448,6 @@ exports[`uni-builder rspack > should generator rspack config correctly 1`] = ` "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "> 0.01%", @@ -320,6 +472,7 @@ exports[`uni-builder rspack > should generator rspack config correctly 1`] = ` [Function], [Function], [Function], + [Function], ], }, "sourceMap": true, @@ -331,6 +484,9 @@ exports[`uni-builder rspack > should generator rspack config correctly 1`] = ` "implementation": "/node_modules//@rsbuild/shared/compiled/less", "lessOptions": { "javascriptEnabled": true, + "paths": [ + "node_modules", + ], }, "sourceMap": true, }, @@ -356,7 +512,6 @@ exports[`uni-builder rspack > should generator rspack config correctly 1`] = ` "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "> 0.01%", @@ -381,6 +536,7 @@ exports[`uni-builder rspack > should generator rspack config correctly 1`] = ` [Function], [Function], [Function], + [Function], ], }, "sourceMap": true, @@ -415,7 +571,6 @@ exports[`uni-builder rspack > should generator rspack config correctly 1`] = ` "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "> 0.01%", @@ -440,6 +595,7 @@ exports[`uni-builder rspack > should generator rspack config correctly 1`] = ` [Function], [Function], [Function], + [Function], ], }, "sourceMap": true, @@ -465,172 +621,25 @@ exports[`uni-builder rspack > should generator rspack config correctly 1`] = ` "test": /\\\\\\.s\\(\\?:a\\|c\\)ss\\$/, }, { - "include": [ + "test": /\\\\\\.toml\\$/, + "type": "javascript/auto", + "use": [ { - "and": [ - "", - { - "not": /\\[\\\\\\\\/\\]node_modules\\[\\\\\\\\/\\]/, - }, - ], + "loader": "/node_modules//@rsbuild/plugin-toml/compiled/toml-loader", }, - /\\\\\\.\\(\\?:ts\\|tsx\\|jsx\\|mts\\|cts\\)\\$/, ], - "test": /\\\\\\.\\(\\?:js\\|jsx\\|mjs\\|cjs\\|ts\\|tsx\\|mts\\|cts\\)\\$/, + }, + { + "test": /\\\\\\.ya\\?ml\\$/, "type": "javascript/auto", "use": [ { - "loader": "builtin:swc-loader", - "options": { - "env": { - "coreJs": "3.32", - "mode": "entry", - "targets": [ - "> 0.01%", - "not dead", - "not op_mini all", - ], - }, - "isModule": "unknown", - "jsc": { - "externalHelpers": true, - "parser": { - "decorators": true, - "syntax": "typescript", - "tsx": true, - }, - "preserveAllComments": true, - "transform": { - "decoratorMetadata": true, - "legacyDecorator": true, - "react": { - "development": true, - "refresh": true, - "runtime": "automatic", - }, - }, - }, - "rspackExperiments": { - "import": [ - { - "libraryDirectory": "es", - "libraryName": "antd", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "es", - "libraryName": "@arco-design/web-react", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "react-icon", - "libraryName": "@arco-design/web-react/icon", - }, - ], - "styledComponents": { - "displayName": true, - "pure": false, - "ssr": false, - "transpileTemplateLiterals": true, - }, - }, - "sourceMaps": true, - }, + "loader": "/node_modules//@rsbuild/plugin-yaml/compiled/yaml-loader", }, ], }, { - "mimetype": { - "or": [ - "text/javascript", - "application/javascript", - ], - }, - "use": [ - { - "loader": "builtin:swc-loader", - "options": { - "env": { - "coreJs": "3.32", - "mode": "entry", - "targets": [ - "> 0.01%", - "not dead", - "not op_mini all", - ], - }, - "isModule": "unknown", - "jsc": { - "externalHelpers": true, - "parser": { - "decorators": true, - "syntax": "typescript", - "tsx": true, - }, - "preserveAllComments": true, - "transform": { - "decoratorMetadata": true, - "legacyDecorator": true, - "react": { - "development": true, - "refresh": true, - "runtime": "automatic", - }, - }, - }, - "rspackExperiments": { - "import": [ - { - "libraryDirectory": "es", - "libraryName": "antd", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "es", - "libraryName": "@arco-design/web-react", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "react-icon", - "libraryName": "@arco-design/web-react/icon", - }, - ], - "styledComponents": { - "displayName": true, - "pure": false, - "ssr": false, - "transpileTemplateLiterals": true, - }, - }, - "sourceMaps": true, - }, - }, - ], - }, - { - "test": /\\\\\\.toml\\$/, - "type": "javascript/auto", - "use": [ - { - "loader": "/node_modules//@rsbuild/plugin-toml/compiled/toml-loader", - }, - ], - }, - { - "test": /\\\\\\.ya\\?ml\\$/, - "type": "javascript/auto", - "use": [ - { - "loader": "/node_modules//@rsbuild/plugin-yaml/compiled/yaml-loader", - }, - ], - }, - { - "oneOf": [ + "oneOf": [ { "generator": { "filename": "static/svg/[name].[contenthash:8].svg", @@ -981,10 +990,12 @@ exports[`uni-builder rspack > should generator rspack config correctly 2`] = ` "rsbuild:start-url", "rsbuild:inline-chunk", "rsbuild:bundle-analyzer", + "rsbuild:rsdoctor", "plugin-network-performance", "plugin-preload-or-prefetch", "rsbuild:performance", "rsbuild:server", + "rsbuild:module-federation", "rsbuild:rspack-profile", "uni-builder:split-chunks", "uni-builder:global-vars", @@ -992,6 +1003,8 @@ exports[`uni-builder rspack > should generator rspack config correctly 2`] = ` "uni-builder:emit-route-file", "rsbuild:toml", "rsbuild:yaml", + "uni-builder:antd", + "uni-builder:arco", "rsbuild:type-check", "uni-builder:runtime-chunk", "rsbuild:react", @@ -1041,6 +1054,156 @@ exports[`uni-builder rspack > should generator rspack config correctly when prod }, "test": /\\\\\\.m\\?js/, }, + { + "include": [ + { + "and": [ + "", + { + "not": /\\[\\\\\\\\/\\]node_modules\\[\\\\\\\\/\\]/, + }, + ], + }, + /\\\\\\.\\(\\?:ts\\|tsx\\|jsx\\|mts\\|cts\\)\\$/, + ], + "test": /\\\\\\.\\(\\?:js\\|jsx\\|mjs\\|cjs\\|ts\\|tsx\\|mts\\|cts\\)\\$/, + "type": "javascript/auto", + "use": [ + { + "loader": "builtin:swc-loader", + "options": { + "env": { + "coreJs": "3.32", + "mode": "entry", + "targets": [ + "> 0.01%", + "not dead", + "not op_mini all", + ], + }, + "isModule": "unknown", + "jsc": { + "externalHelpers": true, + "parser": { + "decorators": true, + "syntax": "typescript", + "tsx": true, + }, + "preserveAllComments": true, + "transform": { + "decoratorMetadata": true, + "legacyDecorator": true, + "react": { + "development": false, + "refresh": false, + "runtime": "automatic", + }, + }, + }, + "rspackExperiments": { + "import": [ + { + "libraryDirectory": "es", + "libraryName": "antd", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "es", + "libraryName": "@arco-design/web-react", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "react-icon", + "libraryName": "@arco-design/web-react/icon", + }, + ], + "styledComponents": { + "displayName": true, + "pure": true, + "ssr": false, + "transpileTemplateLiterals": true, + }, + }, + "sourceMaps": false, + }, + }, + ], + }, + { + "mimetype": { + "or": [ + "text/javascript", + "application/javascript", + ], + }, + "resolve": { + "fullySpecified": false, + }, + "use": [ + { + "loader": "builtin:swc-loader", + "options": { + "env": { + "coreJs": "3.32", + "mode": "entry", + "targets": [ + "> 0.01%", + "not dead", + "not op_mini all", + ], + }, + "isModule": "unknown", + "jsc": { + "externalHelpers": true, + "parser": { + "decorators": true, + "syntax": "typescript", + "tsx": true, + }, + "preserveAllComments": true, + "transform": { + "decoratorMetadata": true, + "legacyDecorator": true, + "react": { + "development": false, + "refresh": false, + "runtime": "automatic", + }, + }, + }, + "rspackExperiments": { + "import": [ + { + "libraryDirectory": "es", + "libraryName": "antd", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "es", + "libraryName": "@arco-design/web-react", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "react-icon", + "libraryName": "@arco-design/web-react/icon", + }, + ], + "styledComponents": { + "displayName": true, + "pure": true, + "ssr": false, + "transpileTemplateLiterals": true, + }, + }, + "sourceMaps": false, + }, + }, + ], + }, { "oneOf": [ { @@ -1146,7 +1309,6 @@ exports[`uni-builder rspack > should generator rspack config correctly when prod "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "> 0.01%", @@ -1171,6 +1333,7 @@ exports[`uni-builder rspack > should generator rspack config correctly when prod [Function], [Function], [Function], + [Function], ], }, "sourceMap": false, @@ -1191,7 +1354,6 @@ exports[`uni-builder rspack > should generator rspack config correctly when prod "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "> 0.01%", @@ -1216,6 +1378,7 @@ exports[`uni-builder rspack > should generator rspack config correctly when prod [Function], [Function], [Function], + [Function], ], }, "sourceMap": false, @@ -1242,7 +1405,6 @@ exports[`uni-builder rspack > should generator rspack config correctly when prod "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "> 0.01%", @@ -1267,6 +1429,7 @@ exports[`uni-builder rspack > should generator rspack config correctly when prod [Function], [Function], [Function], + [Function], ], }, "sourceMap": false, @@ -1278,6 +1441,9 @@ exports[`uni-builder rspack > should generator rspack config correctly when prod "implementation": "/node_modules//@rsbuild/shared/compiled/less", "lessOptions": { "javascriptEnabled": true, + "paths": [ + "node_modules", + ], }, "sourceMap": false, }, @@ -1297,7 +1463,6 @@ exports[`uni-builder rspack > should generator rspack config correctly when prod "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "> 0.01%", @@ -1322,6 +1487,7 @@ exports[`uni-builder rspack > should generator rspack config correctly when prod [Function], [Function], [Function], + [Function], ], }, "sourceMap": false, @@ -1333,6 +1499,9 @@ exports[`uni-builder rspack > should generator rspack config correctly when prod "implementation": "/node_modules//@rsbuild/shared/compiled/less", "lessOptions": { "javascriptEnabled": true, + "paths": [ + "node_modules", + ], }, "sourceMap": false, }, @@ -1358,7 +1527,6 @@ exports[`uni-builder rspack > should generator rspack config correctly when prod "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "> 0.01%", @@ -1383,6 +1551,7 @@ exports[`uni-builder rspack > should generator rspack config correctly when prod [Function], [Function], [Function], + [Function], ], }, "sourceMap": false, @@ -1417,7 +1586,6 @@ exports[`uni-builder rspack > should generator rspack config correctly when prod "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "> 0.01%", @@ -1442,6 +1610,7 @@ exports[`uni-builder rspack > should generator rspack config correctly when prod [Function], [Function], [Function], + [Function], ], }, "sourceMap": false, @@ -1467,163 +1636,16 @@ exports[`uni-builder rspack > should generator rspack config correctly when prod "test": /\\\\\\.s\\(\\?:a\\|c\\)ss\\$/, }, { - "include": [ + "test": /\\\\\\.toml\\$/, + "type": "javascript/auto", + "use": [ { - "and": [ - "", - { - "not": /\\[\\\\\\\\/\\]node_modules\\[\\\\\\\\/\\]/, - }, - ], + "loader": "/node_modules//@rsbuild/plugin-toml/compiled/toml-loader", }, - /\\\\\\.\\(\\?:ts\\|tsx\\|jsx\\|mts\\|cts\\)\\$/, ], - "test": /\\\\\\.\\(\\?:js\\|jsx\\|mjs\\|cjs\\|ts\\|tsx\\|mts\\|cts\\)\\$/, - "type": "javascript/auto", - "use": [ - { - "loader": "builtin:swc-loader", - "options": { - "env": { - "coreJs": "3.32", - "mode": "entry", - "targets": [ - "> 0.01%", - "not dead", - "not op_mini all", - ], - }, - "isModule": "unknown", - "jsc": { - "externalHelpers": true, - "parser": { - "decorators": true, - "syntax": "typescript", - "tsx": true, - }, - "preserveAllComments": true, - "transform": { - "decoratorMetadata": true, - "legacyDecorator": true, - "react": { - "development": false, - "refresh": false, - "runtime": "automatic", - }, - }, - }, - "rspackExperiments": { - "import": [ - { - "libraryDirectory": "es", - "libraryName": "antd", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "es", - "libraryName": "@arco-design/web-react", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "react-icon", - "libraryName": "@arco-design/web-react/icon", - }, - ], - "styledComponents": { - "displayName": true, - "pure": true, - "ssr": false, - "transpileTemplateLiterals": true, - }, - }, - "sourceMaps": false, - }, - }, - ], - }, - { - "mimetype": { - "or": [ - "text/javascript", - "application/javascript", - ], - }, - "use": [ - { - "loader": "builtin:swc-loader", - "options": { - "env": { - "coreJs": "3.32", - "mode": "entry", - "targets": [ - "> 0.01%", - "not dead", - "not op_mini all", - ], - }, - "isModule": "unknown", - "jsc": { - "externalHelpers": true, - "parser": { - "decorators": true, - "syntax": "typescript", - "tsx": true, - }, - "preserveAllComments": true, - "transform": { - "decoratorMetadata": true, - "legacyDecorator": true, - "react": { - "development": false, - "refresh": false, - "runtime": "automatic", - }, - }, - }, - "rspackExperiments": { - "import": [ - { - "libraryDirectory": "es", - "libraryName": "antd", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "es", - "libraryName": "@arco-design/web-react", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "react-icon", - "libraryName": "@arco-design/web-react/icon", - }, - ], - "styledComponents": { - "displayName": true, - "pure": true, - "ssr": false, - "transpileTemplateLiterals": true, - }, - }, - "sourceMaps": false, - }, - }, - ], - }, - { - "test": /\\\\\\.toml\\$/, - "type": "javascript/auto", - "use": [ - { - "loader": "/node_modules//@rsbuild/plugin-toml/compiled/toml-loader", - }, - ], - }, - { - "test": /\\\\\\.ya\\?ml\\$/, + }, + { + "test": /\\\\\\.ya\\?ml\\$/, "type": "javascript/auto", "use": [ { @@ -2060,332 +2082,21 @@ exports[`uni-builder webpack > should generator webpack config correctly 1`] = ` "test": /\\\\\\.m\\?js/, }, { - "oneOf": [ - { - "generator": { - "filename": "static/image/[name].[contenthash:8][ext]", - }, - "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset/resource", - }, - { - "resourceQuery": /inline/, - "type": "asset/inline", - }, - { - "generator": { - "filename": "static/image/[name].[contenthash:8][ext]", - }, - "parser": { - "dataUrlCondition": { - "maxSize": 10000, - }, - }, - "type": "asset", - }, - ], - "test": /\\\\\\.\\(\\?:png\\|jpg\\|jpeg\\|pjpeg\\|pjp\\|gif\\|bmp\\|webp\\|ico\\|apng\\|avif\\|tif\\|tiff\\|jfif\\)\\$/i, - }, - { - "oneOf": [ - { - "generator": { - "filename": "static/media/[name].[contenthash:8][ext]", - }, - "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset/resource", - }, - { - "resourceQuery": /inline/, - "type": "asset/inline", - }, - { - "generator": { - "filename": "static/media/[name].[contenthash:8][ext]", - }, - "parser": { - "dataUrlCondition": { - "maxSize": 10000, - }, - }, - "type": "asset", - }, - ], - "test": /\\\\\\.\\(\\?:mp4\\|webm\\|ogg\\|mov\\|mp3\\|wav\\|flac\\|aac\\|m4a\\|opus\\)\\$/i, - }, - { - "oneOf": [ - { - "generator": { - "filename": "static/font/[name].[contenthash:8][ext]", - }, - "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset/resource", - }, - { - "resourceQuery": /inline/, - "type": "asset/inline", - }, + "include": [ { - "generator": { - "filename": "static/font/[name].[contenthash:8][ext]", - }, - "parser": { - "dataUrlCondition": { - "maxSize": 10000, + "and": [ + "", + { + "not": /\\[\\\\\\\\/\\]node_modules\\[\\\\\\\\/\\]/, }, - }, - "type": "asset", + ], }, + /\\\\\\.\\(\\?:ts\\|tsx\\|jsx\\|mts\\|cts\\)\\$/, ], - "test": /\\\\\\.\\(\\?:woff\\|woff2\\|eot\\|ttf\\|otf\\|ttc\\)\\$/i, - }, - { - "dependency": "url", - "generator": { - "filename": "static/wasm/[hash].module.wasm", - }, - "test": /\\\\\\.wasm\\$/, - "type": "asset/resource", - }, - { - "resolve": { - "preferRelative": true, - }, - "sideEffects": true, - "test": /\\\\\\.css\\$/, + "test": /\\\\\\.\\(\\?:js\\|jsx\\|mjs\\|cjs\\|ts\\|tsx\\|mts\\|cts\\)\\$/, "use": [ { - "loader": "/node_modules//mini-css-extract-plugin/dist/loader.js", - }, - { - "loader": "/node_modules//@rsbuild/shared/compiled/css-loader", - "options": { - "importLoaders": 1, - "modules": { - "auto": true, - "exportLocalsConvention": "camelCase", - "localIdentName": "[path][name]__[local]-[hash:base64:6]", - }, - "sourceMap": true, - }, - }, - { - "loader": "/node_modules//@rsbuild/shared/compiled/postcss-loader", - "options": { - "postcssOptions": { - "config": false, - "plugins": [ - [Function], - { - "browsers": [ - "> 0.01%", - "not dead", - "not op_mini all", - ], - "info": [Function], - "options": { - "flexbox": "no-2009", - "overrideBrowserslist": [ - "> 0.01%", - "not dead", - "not op_mini all", - ], - }, - "postcssPlugin": "autoprefixer", - "prepare": [Function], - }, - [Function], - [Function], - [Function], - [Function], - [Function], - [Function], - ], - }, - "sourceMap": true, - }, - }, - ], - }, - { - "resolve": { - "preferRelative": true, - }, - "sideEffects": true, - "test": /\\\\\\.s\\(\\?:a\\|c\\)ss\\$/, - "use": [ - { - "loader": "/node_modules//mini-css-extract-plugin/dist/loader.js", - }, - { - "loader": "/node_modules//@rsbuild/shared/compiled/css-loader", - "options": { - "importLoaders": 3, - "modules": { - "auto": true, - "exportLocalsConvention": "camelCase", - "localIdentName": "[path][name]__[local]-[hash:base64:6]", - }, - "sourceMap": true, - }, - }, - { - "loader": "/node_modules//@rsbuild/shared/compiled/postcss-loader", - "options": { - "postcssOptions": { - "config": false, - "plugins": [ - [Function], - { - "browsers": [ - "> 0.01%", - "not dead", - "not op_mini all", - ], - "info": [Function], - "options": { - "flexbox": "no-2009", - "overrideBrowserslist": [ - "> 0.01%", - "not dead", - "not op_mini all", - ], - }, - "postcssPlugin": "autoprefixer", - "prepare": [Function], - }, - [Function], - [Function], - [Function], - [Function], - [Function], - [Function], - ], - }, - "sourceMap": true, - }, - }, - { - "loader": "/node_modules//@rsbuild/shared/compiled/resolve-url-loader", - "options": { - "join": [Function], - "sourceMap": false, - }, - }, - { - "loader": "/node_modules//@rsbuild/shared/compiled/sass-loader", - "options": { - "implementation": "/node_modules//@rsbuild/shared/compiled/sass", - "sourceMap": true, - }, - }, - ], - }, - { - "resolve": { - "preferRelative": true, - }, - "sideEffects": true, - "test": /\\\\\\.less\\$/, - "use": [ - { - "loader": "/node_modules//mini-css-extract-plugin/dist/loader.js", - }, - { - "loader": "/node_modules//@rsbuild/shared/compiled/css-loader", - "options": { - "importLoaders": 2, - "modules": { - "auto": true, - "exportLocalsConvention": "camelCase", - "localIdentName": "[path][name]__[local]-[hash:base64:6]", - }, - "sourceMap": true, - }, - }, - { - "loader": "/node_modules//@rsbuild/shared/compiled/postcss-loader", - "options": { - "postcssOptions": { - "config": false, - "plugins": [ - [Function], - { - "browsers": [ - "> 0.01%", - "not dead", - "not op_mini all", - ], - "info": [Function], - "options": { - "flexbox": "no-2009", - "overrideBrowserslist": [ - "> 0.01%", - "not dead", - "not op_mini all", - ], - }, - "postcssPlugin": "autoprefixer", - "prepare": [Function], - }, - [Function], - [Function], - [Function], - [Function], - [Function], - [Function], - ], - }, - "sourceMap": true, - }, - }, - { - "loader": "/node_modules//@rsbuild/shared/compiled/less-loader", - "options": { - "implementation": "/node_modules//@rsbuild/shared/compiled/less", - "lessOptions": { - "javascriptEnabled": true, - }, - "sourceMap": true, - }, - }, - ], - }, - { - "test": /\\\\\\.toml\\$/, - "type": "javascript/auto", - "use": [ - { - "loader": "/node_modules//@rsbuild/plugin-toml/compiled/toml-loader", - }, - ], - }, - { - "test": /\\\\\\.ya\\?ml\\$/, - "type": "javascript/auto", - "use": [ - { - "loader": "/node_modules//@rsbuild/plugin-yaml/compiled/yaml-loader", - }, - ], - }, - { - "include": [ - { - "and": [ - "", - { - "not": /\\[\\\\\\\\/\\]node_modules\\[\\\\\\\\/\\]/, - }, - ], - }, - /\\\\\\.\\(\\?:ts\\|tsx\\|jsx\\|mts\\|cts\\)\\$/, - ], - "test": /\\\\\\.\\(\\?:js\\|jsx\\|mjs\\|cjs\\|ts\\|tsx\\|mts\\|cts\\)\\$/, - "use": [ - { - "loader": "/node_modules//babel-loader/lib/index.js", + "loader": "/node_modules//babel-loader/lib/index.js", "options": { "babelrc": false, "compact": false, @@ -2513,6 +2224,9 @@ exports[`uni-builder webpack > should generator webpack config correctly 1`] = ` "application/javascript", ], }, + "resolve": { + "fullySpecified": false, + }, "use": [ { "loader": "/node_modules//babel-loader/lib/index.js", @@ -2634,36 +2348,18 @@ exports[`uni-builder webpack > should generator webpack config correctly 1`] = ` "oneOf": [ { "generator": { - "filename": "static/svg/[name].[contenthash:8].svg", - }, - "issuer": { - "not": [ - /\\\\\\.\\(\\?:js\\|mjs\\|cjs\\|jsx\\)\\$/, - /\\\\\\.\\(\\?:ts\\|mts\\|cts\\|tsx\\)\\$/, - ], + "filename": "static/image/[name].[contenthash:8][ext]", }, "resourceQuery": /\\(__inline=false\\|url\\)/, "type": "asset/resource", }, { - "issuer": { - "not": [ - /\\\\\\.\\(\\?:js\\|mjs\\|cjs\\|jsx\\)\\$/, - /\\\\\\.\\(\\?:ts\\|mts\\|cts\\|tsx\\)\\$/, - ], - }, "resourceQuery": /inline/, "type": "asset/inline", }, { "generator": { - "filename": "static/svg/[name].[contenthash:8].svg", - }, - "issuer": { - "not": [ - /\\\\\\.\\(\\?:js\\|mjs\\|cjs\\|jsx\\)\\$/, - /\\\\\\.\\(\\?:ts\\|mts\\|cts\\|tsx\\)\\$/, - ], + "filename": "static/image/[name].[contenthash:8][ext]", }, "parser": { "dataUrlCondition": { @@ -2672,16 +2368,348 @@ exports[`uni-builder webpack > should generator webpack config correctly 1`] = ` }, "type": "asset", }, + ], + "test": /\\\\\\.\\(\\?:png\\|jpg\\|jpeg\\|pjpeg\\|pjp\\|gif\\|bmp\\|webp\\|ico\\|apng\\|avif\\|tif\\|tiff\\|jfif\\)\\$/i, + }, + { + "oneOf": [ + { + "generator": { + "filename": "static/media/[name].[contenthash:8][ext]", + }, + "resourceQuery": /\\(__inline=false\\|url\\)/, + "type": "asset/resource", + }, { "resourceQuery": /inline/, "type": "asset/inline", }, { "generator": { - "filename": "static/svg/[name].[contenthash:8].svg", + "filename": "static/media/[name].[contenthash:8][ext]", }, - "resourceQuery": /url/, - "type": "asset/resource", + "parser": { + "dataUrlCondition": { + "maxSize": 10000, + }, + }, + "type": "asset", + }, + ], + "test": /\\\\\\.\\(\\?:mp4\\|webm\\|ogg\\|mov\\|mp3\\|wav\\|flac\\|aac\\|m4a\\|opus\\)\\$/i, + }, + { + "oneOf": [ + { + "generator": { + "filename": "static/font/[name].[contenthash:8][ext]", + }, + "resourceQuery": /\\(__inline=false\\|url\\)/, + "type": "asset/resource", + }, + { + "resourceQuery": /inline/, + "type": "asset/inline", + }, + { + "generator": { + "filename": "static/font/[name].[contenthash:8][ext]", + }, + "parser": { + "dataUrlCondition": { + "maxSize": 10000, + }, + }, + "type": "asset", + }, + ], + "test": /\\\\\\.\\(\\?:woff\\|woff2\\|eot\\|ttf\\|otf\\|ttc\\)\\$/i, + }, + { + "dependency": "url", + "generator": { + "filename": "static/wasm/[hash].module.wasm", + }, + "test": /\\\\\\.wasm\\$/, + "type": "asset/resource", + }, + { + "resolve": { + "preferRelative": true, + }, + "sideEffects": true, + "test": /\\\\\\.css\\$/, + "use": [ + { + "loader": "/node_modules//mini-css-extract-plugin/dist/loader.js", + }, + { + "loader": "/node_modules//@rsbuild/shared/compiled/css-loader", + "options": { + "importLoaders": 1, + "modules": { + "auto": true, + "exportLocalsConvention": "camelCase", + "localIdentName": "[path][name]__[local]-[hash:base64:6]", + }, + "sourceMap": true, + }, + }, + { + "loader": "/node_modules//@rsbuild/shared/compiled/postcss-loader", + "options": { + "postcssOptions": { + "config": false, + "plugins": [ + { + "browsers": [ + "> 0.01%", + "not dead", + "not op_mini all", + ], + "info": [Function], + "options": { + "flexbox": "no-2009", + "overrideBrowserslist": [ + "> 0.01%", + "not dead", + "not op_mini all", + ], + }, + "postcssPlugin": "autoprefixer", + "prepare": [Function], + }, + [Function], + [Function], + [Function], + [Function], + [Function], + [Function], + [Function], + ], + }, + "sourceMap": true, + }, + }, + ], + }, + { + "resolve": { + "preferRelative": true, + }, + "sideEffects": true, + "test": /\\\\\\.s\\(\\?:a\\|c\\)ss\\$/, + "use": [ + { + "loader": "/node_modules//mini-css-extract-plugin/dist/loader.js", + }, + { + "loader": "/node_modules//@rsbuild/shared/compiled/css-loader", + "options": { + "importLoaders": 3, + "modules": { + "auto": true, + "exportLocalsConvention": "camelCase", + "localIdentName": "[path][name]__[local]-[hash:base64:6]", + }, + "sourceMap": true, + }, + }, + { + "loader": "/node_modules//@rsbuild/shared/compiled/postcss-loader", + "options": { + "postcssOptions": { + "config": false, + "plugins": [ + { + "browsers": [ + "> 0.01%", + "not dead", + "not op_mini all", + ], + "info": [Function], + "options": { + "flexbox": "no-2009", + "overrideBrowserslist": [ + "> 0.01%", + "not dead", + "not op_mini all", + ], + }, + "postcssPlugin": "autoprefixer", + "prepare": [Function], + }, + [Function], + [Function], + [Function], + [Function], + [Function], + [Function], + [Function], + ], + }, + "sourceMap": true, + }, + }, + { + "loader": "/node_modules//@rsbuild/shared/compiled/resolve-url-loader", + "options": { + "join": [Function], + "sourceMap": false, + }, + }, + { + "loader": "/node_modules//@rsbuild/shared/compiled/sass-loader", + "options": { + "implementation": "/node_modules//@rsbuild/shared/compiled/sass", + "sourceMap": true, + }, + }, + ], + }, + { + "resolve": { + "preferRelative": true, + }, + "sideEffects": true, + "test": /\\\\\\.less\\$/, + "use": [ + { + "loader": "/node_modules//mini-css-extract-plugin/dist/loader.js", + }, + { + "loader": "/node_modules//@rsbuild/shared/compiled/css-loader", + "options": { + "importLoaders": 2, + "modules": { + "auto": true, + "exportLocalsConvention": "camelCase", + "localIdentName": "[path][name]__[local]-[hash:base64:6]", + }, + "sourceMap": true, + }, + }, + { + "loader": "/node_modules//@rsbuild/shared/compiled/postcss-loader", + "options": { + "postcssOptions": { + "config": false, + "plugins": [ + { + "browsers": [ + "> 0.01%", + "not dead", + "not op_mini all", + ], + "info": [Function], + "options": { + "flexbox": "no-2009", + "overrideBrowserslist": [ + "> 0.01%", + "not dead", + "not op_mini all", + ], + }, + "postcssPlugin": "autoprefixer", + "prepare": [Function], + }, + [Function], + [Function], + [Function], + [Function], + [Function], + [Function], + [Function], + ], + }, + "sourceMap": true, + }, + }, + { + "loader": "/node_modules//@rsbuild/shared/compiled/less-loader", + "options": { + "implementation": "/node_modules//@rsbuild/shared/compiled/less", + "lessOptions": { + "javascriptEnabled": true, + "paths": [ + "node_modules", + ], + }, + "sourceMap": true, + }, + }, + ], + }, + { + "test": /\\\\\\.toml\\$/, + "type": "javascript/auto", + "use": [ + { + "loader": "/node_modules//@rsbuild/plugin-toml/compiled/toml-loader", + }, + ], + }, + { + "test": /\\\\\\.ya\\?ml\\$/, + "type": "javascript/auto", + "use": [ + { + "loader": "/node_modules//@rsbuild/plugin-yaml/compiled/yaml-loader", + }, + ], + }, + { + "oneOf": [ + { + "generator": { + "filename": "static/svg/[name].[contenthash:8].svg", + }, + "issuer": { + "not": [ + /\\\\\\.\\(\\?:js\\|mjs\\|cjs\\|jsx\\)\\$/, + /\\\\\\.\\(\\?:ts\\|mts\\|cts\\|tsx\\)\\$/, + ], + }, + "resourceQuery": /\\(__inline=false\\|url\\)/, + "type": "asset/resource", + }, + { + "issuer": { + "not": [ + /\\\\\\.\\(\\?:js\\|mjs\\|cjs\\|jsx\\)\\$/, + /\\\\\\.\\(\\?:ts\\|mts\\|cts\\|tsx\\)\\$/, + ], + }, + "resourceQuery": /inline/, + "type": "asset/inline", + }, + { + "generator": { + "filename": "static/svg/[name].[contenthash:8].svg", + }, + "issuer": { + "not": [ + /\\\\\\.\\(\\?:js\\|mjs\\|cjs\\|jsx\\)\\$/, + /\\\\\\.\\(\\?:ts\\|mts\\|cts\\|tsx\\)\\$/, + ], + }, + "parser": { + "dataUrlCondition": { + "maxSize": 10000, + }, + }, + "type": "asset", + }, + { + "resourceQuery": /inline/, + "type": "asset/inline", + }, + { + "generator": { + "filename": "static/svg/[name].[contenthash:8].svg", + }, + "resourceQuery": /url/, + "type": "asset/resource", }, { "type": "javascript/auto", @@ -3081,6 +3109,275 @@ exports[`uni-builder webpack > should generator webpack config correctly when pr }, "test": /\\\\\\.m\\?js/, }, + { + "include": [ + { + "and": [ + "", + { + "not": /\\[\\\\\\\\/\\]node_modules\\[\\\\\\\\/\\]/, + }, + ], + }, + /\\\\\\.\\(\\?:ts\\|tsx\\|jsx\\|mts\\|cts\\)\\$/, + ], + "test": /\\\\\\.\\(\\?:js\\|jsx\\|mjs\\|cjs\\|ts\\|tsx\\|mts\\|cts\\)\\$/, + "use": [ + { + "loader": "/node_modules//babel-loader/lib/index.js", + "options": { + "babelrc": false, + "compact": true, + "configFile": false, + "plugins": [ + [ + "/node_modules//@babel/plugin-proposal-decorators/lib/index.js", + { + "version": "legacy", + }, + ], + "/node_modules//@babel/plugin-proposal-export-default-from/lib/index.js", + "/node_modules//@babel/plugin-proposal-partial-application/lib/index.js", + [ + "/node_modules//@babel/plugin-proposal-pipeline-operator/lib/index.js", + { + "proposal": "minimal", + }, + ], + [ + "/node_modules//@babel/plugin-transform-runtime/lib/index.js", + { + "useESModules": true, + "version": "7.23.2", + }, + ], + "/node_modules//@rsbuild/babel-preset/dist/pluginLockCorejsVersion", + [ + "/node_modules//babel-plugin-import/lib/index.js", + { + "libraryDirectory": "es", + "libraryName": "antd", + "style": true, + }, + "antd", + ], + [ + "/node_modules//babel-plugin-import/lib/index.js", + { + "camel2DashComponentName": false, + "libraryDirectory": "es", + "libraryName": "@arco-design/web-react", + "style": true, + }, + "@arco-design/web-react", + ], + [ + "/node_modules//babel-plugin-import/lib/index.js", + { + "camel2DashComponentName": false, + "libraryDirectory": "react-icon", + "libraryName": "@arco-design/web-react/icon", + }, + "@arco-design/web-react/icon", + ], + [ + "/compiled/babel-plugin-lodash/index.js", + {}, + ], + [ + "/node_modules//babel-plugin-transform-react-remove-prop-types/lib/index.js", + { + "removeImport": true, + }, + ], + [ + "/node_modules//babel-plugin-styled-components/lib/index.js", + { + "displayName": true, + "pure": true, + "ssr": false, + "transpileTemplateLiterals": true, + }, + ], + ], + "presets": [ + [ + "/node_modules//@babel/preset-env/lib/index.js", + { + "bugfixes": true, + "corejs": { + "proposals": true, + "version": "3.32", + }, + "exclude": [ + "transform-typeof-symbol", + ], + "modules": false, + "targets": [ + "> 0.01%", + "not dead", + "not op_mini all", + ], + "useBuiltIns": "entry", + }, + ], + [ + "/node_modules//@babel/preset-typescript/lib/index.js", + { + "allExtensions": true, + "allowDeclareFields": true, + "allowNamespaces": true, + "isTSX": true, + "optimizeConstEnums": true, + }, + ], + [ + "/node_modules//@babel/preset-react/lib/index.js", + { + "development": false, + "runtime": "automatic", + "useBuiltIns": true, + "useSpread": false, + }, + ], + ], + }, + }, + ], + }, + { + "mimetype": { + "or": [ + "text/javascript", + "application/javascript", + ], + }, + "resolve": { + "fullySpecified": false, + }, + "use": [ + { + "loader": "/node_modules//babel-loader/lib/index.js", + "options": { + "babelrc": false, + "compact": true, + "configFile": false, + "plugins": [ + [ + "/node_modules//@babel/plugin-proposal-decorators/lib/index.js", + { + "version": "legacy", + }, + ], + "/node_modules//@babel/plugin-proposal-export-default-from/lib/index.js", + "/node_modules//@babel/plugin-proposal-partial-application/lib/index.js", + [ + "/node_modules//@babel/plugin-proposal-pipeline-operator/lib/index.js", + { + "proposal": "minimal", + }, + ], + [ + "/node_modules//@babel/plugin-transform-runtime/lib/index.js", + { + "useESModules": true, + "version": "7.23.2", + }, + ], + "/node_modules//@rsbuild/babel-preset/dist/pluginLockCorejsVersion", + [ + "/node_modules//babel-plugin-import/lib/index.js", + { + "libraryDirectory": "es", + "libraryName": "antd", + "style": true, + }, + "antd", + ], + [ + "/node_modules//babel-plugin-import/lib/index.js", + { + "camel2DashComponentName": false, + "libraryDirectory": "es", + "libraryName": "@arco-design/web-react", + "style": true, + }, + "@arco-design/web-react", + ], + [ + "/node_modules//babel-plugin-import/lib/index.js", + { + "camel2DashComponentName": false, + "libraryDirectory": "react-icon", + "libraryName": "@arco-design/web-react/icon", + }, + "@arco-design/web-react/icon", + ], + [ + "/compiled/babel-plugin-lodash/index.js", + {}, + ], + [ + "/node_modules//babel-plugin-transform-react-remove-prop-types/lib/index.js", + { + "removeImport": true, + }, + ], + [ + "/node_modules//babel-plugin-styled-components/lib/index.js", + { + "displayName": true, + "pure": true, + "ssr": false, + "transpileTemplateLiterals": true, + }, + ], + ], + "presets": [ + [ + "/node_modules//@babel/preset-env/lib/index.js", + { + "bugfixes": true, + "corejs": { + "proposals": true, + "version": "3.32", + }, + "exclude": [ + "transform-typeof-symbol", + ], + "modules": false, + "targets": [ + "> 0.01%", + "not dead", + "not op_mini all", + ], + "useBuiltIns": "entry", + }, + ], + [ + "/node_modules//@babel/preset-typescript/lib/index.js", + { + "allExtensions": true, + "allowDeclareFields": true, + "allowNamespaces": true, + "isTSX": true, + "optimizeConstEnums": true, + }, + ], + [ + "/node_modules//@babel/preset-react/lib/index.js", + { + "development": false, + "runtime": "automatic", + "useBuiltIns": true, + "useSpread": false, + }, + ], + ], + }, + }, + ], + }, { "oneOf": [ { @@ -3198,7 +3495,6 @@ exports[`uni-builder webpack > should generator webpack config correctly when pr "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "> 0.01%", @@ -3223,6 +3519,7 @@ exports[`uni-builder webpack > should generator webpack config correctly when pr [Function], [Function], [Function], + [Function], ], }, "sourceMap": false, @@ -3253,411 +3550,148 @@ exports[`uni-builder webpack > should generator webpack config correctly when pr }, }, { - "loader": "/node_modules//@rsbuild/shared/compiled/postcss-loader", - "options": { - "postcssOptions": { - "config": false, - "plugins": [ - [Function], - { - "browsers": [ - "> 0.01%", - "not dead", - "not op_mini all", - ], - "info": [Function], - "options": { - "flexbox": "no-2009", - "overrideBrowserslist": [ - "> 0.01%", - "not dead", - "not op_mini all", - ], - }, - "postcssPlugin": "autoprefixer", - "prepare": [Function], - }, - [Function], - [Function], - [Function], - [Function], - [Function], - [Function], - ], - }, - "sourceMap": false, - }, - }, - { - "loader": "/node_modules//@rsbuild/shared/compiled/resolve-url-loader", - "options": { - "join": [Function], - "sourceMap": false, - }, - }, - { - "loader": "/node_modules//@rsbuild/shared/compiled/sass-loader", - "options": { - "implementation": "/node_modules//@rsbuild/shared/compiled/sass", - "sourceMap": true, - }, - }, - ], - }, - { - "resolve": { - "preferRelative": true, - }, - "sideEffects": true, - "test": /\\\\\\.less\\$/, - "use": [ - { - "loader": "/node_modules//mini-css-extract-plugin/dist/loader.js", - }, - { - "loader": "/node_modules//@rsbuild/shared/compiled/css-loader", - "options": { - "importLoaders": 2, - "modules": { - "auto": true, - "exportLocalsConvention": "camelCase", - "localIdentName": "[local]-[hash:base64:6]", - }, - "sourceMap": false, - }, - }, - { - "loader": "/node_modules//@rsbuild/shared/compiled/postcss-loader", - "options": { - "postcssOptions": { - "config": false, - "plugins": [ - [Function], - { - "browsers": [ - "> 0.01%", - "not dead", - "not op_mini all", - ], - "info": [Function], - "options": { - "flexbox": "no-2009", - "overrideBrowserslist": [ - "> 0.01%", - "not dead", - "not op_mini all", - ], - }, - "postcssPlugin": "autoprefixer", - "prepare": [Function], - }, - [Function], - [Function], - [Function], - [Function], - [Function], - [Function], - ], - }, - "sourceMap": false, - }, - }, - { - "loader": "/node_modules//@rsbuild/shared/compiled/less-loader", - "options": { - "implementation": "/node_modules//@rsbuild/shared/compiled/less", - "lessOptions": { - "javascriptEnabled": true, - }, - "sourceMap": false, - }, - }, - ], - }, - { - "test": /\\\\\\.toml\\$/, - "type": "javascript/auto", - "use": [ - { - "loader": "/node_modules//@rsbuild/plugin-toml/compiled/toml-loader", - }, - ], - }, - { - "test": /\\\\\\.ya\\?ml\\$/, - "type": "javascript/auto", - "use": [ - { - "loader": "/node_modules//@rsbuild/plugin-yaml/compiled/yaml-loader", - }, - ], - }, - { - "include": [ - { - "and": [ - "", - { - "not": /\\[\\\\\\\\/\\]node_modules\\[\\\\\\\\/\\]/, - }, - ], - }, - /\\\\\\.\\(\\?:ts\\|tsx\\|jsx\\|mts\\|cts\\)\\$/, - ], - "test": /\\\\\\.\\(\\?:js\\|jsx\\|mjs\\|cjs\\|ts\\|tsx\\|mts\\|cts\\)\\$/, - "use": [ - { - "loader": "/node_modules//babel-loader/lib/index.js", - "options": { - "babelrc": false, - "compact": true, - "configFile": false, - "plugins": [ - [ - "/node_modules//@babel/plugin-proposal-decorators/lib/index.js", - { - "version": "legacy", - }, - ], - "/node_modules//@babel/plugin-proposal-export-default-from/lib/index.js", - "/node_modules//@babel/plugin-proposal-partial-application/lib/index.js", - [ - "/node_modules//@babel/plugin-proposal-pipeline-operator/lib/index.js", - { - "proposal": "minimal", - }, - ], - [ - "/node_modules//@babel/plugin-transform-runtime/lib/index.js", - { - "useESModules": true, - "version": "7.23.2", - }, - ], - "/node_modules//@rsbuild/babel-preset/dist/pluginLockCorejsVersion", - [ - "/node_modules//babel-plugin-import/lib/index.js", - { - "libraryDirectory": "es", - "libraryName": "antd", - "style": true, - }, - "antd", - ], - [ - "/node_modules//babel-plugin-import/lib/index.js", - { - "camel2DashComponentName": false, - "libraryDirectory": "es", - "libraryName": "@arco-design/web-react", - "style": true, - }, - "@arco-design/web-react", - ], - [ - "/node_modules//babel-plugin-import/lib/index.js", - { - "camel2DashComponentName": false, - "libraryDirectory": "react-icon", - "libraryName": "@arco-design/web-react/icon", - }, - "@arco-design/web-react/icon", - ], - [ - "/compiled/babel-plugin-lodash/index.js", - {}, - ], - [ - "/node_modules//babel-plugin-transform-react-remove-prop-types/lib/index.js", - { - "removeImport": true, - }, - ], - [ - "/node_modules//babel-plugin-styled-components/lib/index.js", - { - "displayName": true, - "pure": true, - "ssr": false, - "transpileTemplateLiterals": true, - }, - ], - ], - "presets": [ - [ - "/node_modules//@babel/preset-env/lib/index.js", + "loader": "/node_modules//@rsbuild/shared/compiled/postcss-loader", + "options": { + "postcssOptions": { + "config": false, + "plugins": [ { - "bugfixes": true, - "corejs": { - "proposals": true, - "version": "3.32", - }, - "exclude": [ - "transform-typeof-symbol", - ], - "modules": false, - "targets": [ + "browsers": [ "> 0.01%", "not dead", "not op_mini all", ], - "useBuiltIns": "entry", - }, - ], - [ - "/node_modules//@babel/preset-typescript/lib/index.js", - { - "allExtensions": true, - "allowDeclareFields": true, - "allowNamespaces": true, - "isTSX": true, - "optimizeConstEnums": true, - }, - ], - [ - "/node_modules//@babel/preset-react/lib/index.js", - { - "development": false, - "runtime": "automatic", - "useBuiltIns": true, - "useSpread": false, + "info": [Function], + "options": { + "flexbox": "no-2009", + "overrideBrowserslist": [ + "> 0.01%", + "not dead", + "not op_mini all", + ], + }, + "postcssPlugin": "autoprefixer", + "prepare": [Function], }, + [Function], + [Function], + [Function], + [Function], + [Function], + [Function], + [Function], ], - ], + }, + "sourceMap": false, + }, + }, + { + "loader": "/node_modules//@rsbuild/shared/compiled/resolve-url-loader", + "options": { + "join": [Function], + "sourceMap": false, + }, + }, + { + "loader": "/node_modules//@rsbuild/shared/compiled/sass-loader", + "options": { + "implementation": "/node_modules//@rsbuild/shared/compiled/sass", + "sourceMap": true, }, }, ], }, { - "mimetype": { - "or": [ - "text/javascript", - "application/javascript", - ], + "resolve": { + "preferRelative": true, }, + "sideEffects": true, + "test": /\\\\\\.less\\$/, "use": [ { - "loader": "/node_modules//babel-loader/lib/index.js", + "loader": "/node_modules//mini-css-extract-plugin/dist/loader.js", + }, + { + "loader": "/node_modules//@rsbuild/shared/compiled/css-loader", "options": { - "babelrc": false, - "compact": true, - "configFile": false, - "plugins": [ - [ - "/node_modules//@babel/plugin-proposal-decorators/lib/index.js", - { - "version": "legacy", - }, - ], - "/node_modules//@babel/plugin-proposal-export-default-from/lib/index.js", - "/node_modules//@babel/plugin-proposal-partial-application/lib/index.js", - [ - "/node_modules//@babel/plugin-proposal-pipeline-operator/lib/index.js", - { - "proposal": "minimal", - }, - ], - [ - "/node_modules//@babel/plugin-transform-runtime/lib/index.js", - { - "useESModules": true, - "version": "7.23.2", - }, - ], - "/node_modules//@rsbuild/babel-preset/dist/pluginLockCorejsVersion", - [ - "/node_modules//babel-plugin-import/lib/index.js", - { - "libraryDirectory": "es", - "libraryName": "antd", - "style": true, - }, - "antd", - ], - [ - "/node_modules//babel-plugin-import/lib/index.js", - { - "camel2DashComponentName": false, - "libraryDirectory": "es", - "libraryName": "@arco-design/web-react", - "style": true, - }, - "@arco-design/web-react", - ], - [ - "/node_modules//babel-plugin-import/lib/index.js", - { - "camel2DashComponentName": false, - "libraryDirectory": "react-icon", - "libraryName": "@arco-design/web-react/icon", - }, - "@arco-design/web-react/icon", - ], - [ - "/compiled/babel-plugin-lodash/index.js", - {}, - ], - [ - "/node_modules//babel-plugin-transform-react-remove-prop-types/lib/index.js", - { - "removeImport": true, - }, - ], - [ - "/node_modules//babel-plugin-styled-components/lib/index.js", - { - "displayName": true, - "pure": true, - "ssr": false, - "transpileTemplateLiterals": true, - }, - ], - ], - "presets": [ - [ - "/node_modules//@babel/preset-env/lib/index.js", + "importLoaders": 2, + "modules": { + "auto": true, + "exportLocalsConvention": "camelCase", + "localIdentName": "[local]-[hash:base64:6]", + }, + "sourceMap": false, + }, + }, + { + "loader": "/node_modules//@rsbuild/shared/compiled/postcss-loader", + "options": { + "postcssOptions": { + "config": false, + "plugins": [ { - "bugfixes": true, - "corejs": { - "proposals": true, - "version": "3.32", - }, - "exclude": [ - "transform-typeof-symbol", - ], - "modules": false, - "targets": [ + "browsers": [ "> 0.01%", "not dead", "not op_mini all", ], - "useBuiltIns": "entry", - }, - ], - [ - "/node_modules//@babel/preset-typescript/lib/index.js", - { - "allExtensions": true, - "allowDeclareFields": true, - "allowNamespaces": true, - "isTSX": true, - "optimizeConstEnums": true, + "info": [Function], + "options": { + "flexbox": "no-2009", + "overrideBrowserslist": [ + "> 0.01%", + "not dead", + "not op_mini all", + ], + }, + "postcssPlugin": "autoprefixer", + "prepare": [Function], }, + [Function], + [Function], + [Function], + [Function], + [Function], + [Function], + [Function], ], - [ - "/node_modules//@babel/preset-react/lib/index.js", - { - "development": false, - "runtime": "automatic", - "useBuiltIns": true, - "useSpread": false, - }, + }, + "sourceMap": false, + }, + }, + { + "loader": "/node_modules//@rsbuild/shared/compiled/less-loader", + "options": { + "implementation": "/node_modules//@rsbuild/shared/compiled/less", + "lessOptions": { + "javascriptEnabled": true, + "paths": [ + "node_modules", ], - ], + }, + "sourceMap": false, }, }, ], }, + { + "test": /\\\\\\.toml\\$/, + "type": "javascript/auto", + "use": [ + { + "loader": "/node_modules//@rsbuild/plugin-toml/compiled/toml-loader", + }, + ], + }, + { + "test": /\\\\\\.ya\\?ml\\$/, + "type": "javascript/auto", + "use": [ + { + "loader": "/node_modules//@rsbuild/plugin-yaml/compiled/yaml-loader", + }, + ], + }, { "oneOf": [ { diff --git a/packages/builder/uni-builder/tests/__snapshots__/postcssLegacy.test.ts.snap b/packages/builder/uni-builder/tests/__snapshots__/postcssLegacy.test.ts.snap index 3d8b628b5858..f37c0139cbcf 100644 --- a/packages/builder/uni-builder/tests/__snapshots__/postcssLegacy.test.ts.snap +++ b/packages/builder/uni-builder/tests/__snapshots__/postcssLegacy.test.ts.snap @@ -14,6 +14,152 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 }, "test": /\\\\\\.m\\?js/, }, + { + "include": [ + { + "and": [ + "", + { + "not": /\\[\\\\\\\\/\\]node_modules\\[\\\\\\\\/\\]/, + }, + ], + }, + /\\\\\\.\\(\\?:ts\\|tsx\\|jsx\\|mts\\|cts\\)\\$/, + ], + "test": /\\\\\\.\\(\\?:js\\|jsx\\|mjs\\|cjs\\|ts\\|tsx\\|mts\\|cts\\)\\$/, + "type": "javascript/auto", + "use": [ + { + "loader": "builtin:swc-loader", + "options": { + "env": { + "coreJs": "3.32", + "mode": "entry", + "targets": [ + "chrome >= 87", + ], + }, + "isModule": "unknown", + "jsc": { + "externalHelpers": true, + "parser": { + "decorators": true, + "syntax": "typescript", + "tsx": true, + }, + "preserveAllComments": true, + "transform": { + "decoratorMetadata": true, + "legacyDecorator": true, + "react": { + "development": false, + "refresh": true, + "runtime": "automatic", + }, + }, + }, + "rspackExperiments": { + "import": [ + { + "libraryDirectory": "es", + "libraryName": "antd", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "es", + "libraryName": "@arco-design/web-react", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "react-icon", + "libraryName": "@arco-design/web-react/icon", + }, + ], + "styledComponents": { + "displayName": true, + "pure": false, + "ssr": false, + "transpileTemplateLiterals": true, + }, + }, + "sourceMaps": true, + }, + }, + ], + }, + { + "mimetype": { + "or": [ + "text/javascript", + "application/javascript", + ], + }, + "resolve": { + "fullySpecified": false, + }, + "use": [ + { + "loader": "builtin:swc-loader", + "options": { + "env": { + "coreJs": "3.32", + "mode": "entry", + "targets": [ + "chrome >= 87", + ], + }, + "isModule": "unknown", + "jsc": { + "externalHelpers": true, + "parser": { + "decorators": true, + "syntax": "typescript", + "tsx": true, + }, + "preserveAllComments": true, + "transform": { + "decoratorMetadata": true, + "legacyDecorator": true, + "react": { + "development": false, + "refresh": true, + "runtime": "automatic", + }, + }, + }, + "rspackExperiments": { + "import": [ + { + "libraryDirectory": "es", + "libraryName": "antd", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "es", + "libraryName": "@arco-design/web-react", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "react-icon", + "libraryName": "@arco-design/web-react/icon", + }, + ], + "styledComponents": { + "displayName": true, + "pure": false, + "ssr": false, + "transpileTemplateLiterals": true, + }, + }, + "sourceMaps": true, + }, + }, + ], + }, { "oneOf": [ { @@ -119,7 +265,6 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "chrome >= 87", @@ -136,6 +281,7 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 }, [Function], [Function], + [Function], ], }, "sourceMap": true, @@ -156,7 +302,6 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "chrome >= 87", @@ -173,6 +318,7 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 }, [Function], [Function], + [Function], ], }, "sourceMap": true, @@ -199,7 +345,6 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "chrome >= 87", @@ -216,6 +361,7 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 }, [Function], [Function], + [Function], ], }, "sourceMap": true, @@ -227,6 +373,9 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 "implementation": "/node_modules//@rsbuild/shared/compiled/less", "lessOptions": { "javascriptEnabled": true, + "paths": [ + "node_modules", + ], }, "sourceMap": true, }, @@ -246,7 +395,6 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "chrome >= 87", @@ -263,6 +411,7 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 }, [Function], [Function], + [Function], ], }, "sourceMap": true, @@ -274,6 +423,9 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 "implementation": "/node_modules//@rsbuild/shared/compiled/less", "lessOptions": { "javascriptEnabled": true, + "paths": [ + "node_modules", + ], }, "sourceMap": true, }, @@ -299,7 +451,6 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "chrome >= 87", @@ -316,6 +467,7 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 }, [Function], [Function], + [Function], ], }, "sourceMap": true, @@ -350,7 +502,6 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 "postcssOptions": { "config": false, "plugins": [ - [Function], { "browsers": [ "chrome >= 87", @@ -367,6 +518,7 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 }, [Function], [Function], + [Function], ], }, "sourceMap": true, @@ -391,149 +543,6 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 ], "test": /\\\\\\.s\\(\\?:a\\|c\\)ss\\$/, }, - { - "include": [ - { - "and": [ - "", - { - "not": /\\[\\\\\\\\/\\]node_modules\\[\\\\\\\\/\\]/, - }, - ], - }, - /\\\\\\.\\(\\?:ts\\|tsx\\|jsx\\|mts\\|cts\\)\\$/, - ], - "test": /\\\\\\.\\(\\?:js\\|jsx\\|mjs\\|cjs\\|ts\\|tsx\\|mts\\|cts\\)\\$/, - "type": "javascript/auto", - "use": [ - { - "loader": "builtin:swc-loader", - "options": { - "env": { - "coreJs": "3.32", - "mode": "entry", - "targets": [ - "chrome >= 87", - ], - }, - "isModule": "unknown", - "jsc": { - "externalHelpers": true, - "parser": { - "decorators": true, - "syntax": "typescript", - "tsx": true, - }, - "preserveAllComments": true, - "transform": { - "decoratorMetadata": true, - "legacyDecorator": true, - "react": { - "development": true, - "refresh": true, - "runtime": "automatic", - }, - }, - }, - "rspackExperiments": { - "import": [ - { - "libraryDirectory": "es", - "libraryName": "antd", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "es", - "libraryName": "@arco-design/web-react", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "react-icon", - "libraryName": "@arco-design/web-react/icon", - }, - ], - "styledComponents": { - "displayName": true, - "pure": false, - "ssr": false, - "transpileTemplateLiterals": true, - }, - }, - "sourceMaps": true, - }, - }, - ], - }, - { - "mimetype": { - "or": [ - "text/javascript", - "application/javascript", - ], - }, - "use": [ - { - "loader": "builtin:swc-loader", - "options": { - "env": { - "coreJs": "3.32", - "mode": "entry", - "targets": [ - "chrome >= 87", - ], - }, - "isModule": "unknown", - "jsc": { - "externalHelpers": true, - "parser": { - "decorators": true, - "syntax": "typescript", - "tsx": true, - }, - "preserveAllComments": true, - "transform": { - "decoratorMetadata": true, - "legacyDecorator": true, - "react": { - "development": true, - "refresh": true, - "runtime": "automatic", - }, - }, - }, - "rspackExperiments": { - "import": [ - { - "libraryDirectory": "es", - "libraryName": "antd", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "es", - "libraryName": "@arco-design/web-react", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "react-icon", - "libraryName": "@arco-design/web-react/icon", - }, - ], - "styledComponents": { - "displayName": true, - "pure": false, - "ssr": false, - "transpileTemplateLiterals": true, - }, - }, - "sourceMaps": true, - }, - }, - ], - }, { "test": /\\\\\\.toml\\$/, "type": "javascript/auto", @@ -631,7 +640,7 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 "decoratorMetadata": true, "legacyDecorator": true, "react": { - "development": true, + "development": false, "refresh": true, "runtime": "automatic", }, diff --git a/packages/builder/uni-builder/tests/__snapshots__/styledComponents.test.ts.snap b/packages/builder/uni-builder/tests/__snapshots__/styledComponents.test.ts.snap index 3263cf577680..c9465ef08c9a 100644 --- a/packages/builder/uni-builder/tests/__snapshots__/styledComponents.test.ts.snap +++ b/packages/builder/uni-builder/tests/__snapshots__/styledComponents.test.ts.snap @@ -501,6 +501,8 @@ exports[`plugins/styled-components > should works in webpack swc mode 1`] = ` }, "preserveAllComments": true, "transform": { + "decoratorMetadata": true, + "legacyDecorator": true, "react": { "refresh": true, "runtime": "classic", From e88e86f933b9957d2258a0c520318b8ae84ed20c Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 7 Feb 2024 15:07:09 +0800 Subject: [PATCH 8/8] chore: update lock --- pnpm-lock.yaml | 274 ++++++++++--------------------------------------- 1 file changed, 53 insertions(+), 221 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9407d8bf3980..4cd9821786fd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -729,6 +729,9 @@ importers: postcss-custom-properties: specifier: 13.1.5 version: 13.1.5(postcss@8.4.31) + postcss-flexbugs-fixes: + specifier: 5.0.2 + version: 5.0.2(postcss@8.4.31) postcss-font-variant: specifier: 5.0.0 version: 5.0.0(postcss@8.4.31) @@ -1647,8 +1650,8 @@ importers: specifier: workspace:* version: link:../../review/tsconfig '@rspress/shared': - specifier: 1.11.1 - version: 1.11.1 + specifier: 1.11.2 + version: 1.11.2 '@types/node': specifier: ^14 version: 14.18.35 @@ -1659,8 +1662,8 @@ importers: specifier: ^18.2.0 version: 18.2.0(react@18.2.0) rspress: - specifier: 1.11.1 - version: 1.11.1(typescript@5.3.3)(webpack@5.89.0) + specifier: 1.11.2 + version: 1.11.2(typescript@5.3.3)(webpack@5.89.0) packages/document/main-doc: dependencies: @@ -1675,8 +1678,8 @@ importers: specifier: workspace:* version: link:../../cli/doc-plugin-auto-sidebar '@rspress/shared': - specifier: 1.11.1 - version: 1.11.1 + specifier: 1.11.2 + version: 1.11.2 '@types/fs-extra': specifier: 9.0.13 version: 9.0.13 @@ -1699,8 +1702,8 @@ importers: specifier: ^18 version: 18.2.0(react@18.2.0) rspress: - specifier: 1.11.1 - version: 1.11.1(typescript@5.3.3)(webpack@5.89.0) + specifier: 1.11.2 + version: 1.11.2(typescript@5.3.3)(webpack@5.89.0) ts-node: specifier: ^10.9.1 version: 10.9.2(@types/node@16.11.68)(typescript@5.3.3) @@ -1714,8 +1717,8 @@ importers: specifier: workspace:* version: link:../../cli/doc-plugin-auto-sidebar '@rspress/shared': - specifier: 1.11.1 - version: 1.11.1 + specifier: 1.11.2 + version: 1.11.2 react: specifier: ^18.2.0 version: 18.2.0 @@ -1723,8 +1726,8 @@ importers: specifier: ^18.2.0 version: 18.2.0(react@18.2.0) rspress: - specifier: 1.11.1 - version: 1.11.1(typescript@5.3.3)(webpack@5.89.0) + specifier: 1.11.2 + version: 1.11.2(typescript@5.3.3)(webpack@5.89.0) packages/generator/generator-cases: dependencies: @@ -14297,19 +14300,6 @@ packages: - supports-color dev: false - /@rsbuild/core@0.3.1: - resolution: {integrity: sha512-YrE9mPG1/NmUm9oEVCfSD1NS0wiLUqrfh9b26hXjdSLa5SkPJCpjkTY6ukSyJe+AhT7jmOWTNAAk/X2tD1FwIg==} - engines: {node: '>=14.0.0'} - hasBin: true - dependencies: - '@rsbuild/shared': 0.3.1(@swc/helpers@0.5.3) - '@rspack/core': 0.5.0(@swc/helpers@0.5.3) - '@swc/helpers': 0.5.3 - core-js: 3.32.2 - html-webpack-plugin: /html-rspack-plugin@5.5.7 - postcss: 8.4.31 - dev: true - /@rsbuild/core@0.4.0: resolution: {integrity: sha512-AHz7yMsR0OAsrU3Mqbx0dsBTspV+95ZXaOjjCJYFENSrXnftfcvWy+SOsyKgvz6gHIeOraNKXFuYwXSdd+ImuA==} engines: {node: '>=14.0.0'} @@ -14457,16 +14447,6 @@ packages: - '@swc/helpers' dev: false - /@rsbuild/plugin-react@0.3.1: - resolution: {integrity: sha512-mHkJKIBpXqnlIXg1HWMkZ6LwfQtiqbTTRN8Ag9VlLlDq3AIQLWoiGOAg1PklUon+pdFHQu8/0WG4Yybf3ISMKA==} - dependencies: - '@rsbuild/shared': 0.3.1(@swc/helpers@0.5.3) - '@rspack/plugin-react-refresh': 0.5.0(react-refresh@0.14.0) - react-refresh: 0.14.0 - transitivePeerDependencies: - - '@swc/helpers' - dev: true - /@rsbuild/plugin-react@0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3): resolution: {integrity: sha512-zbvNBLRynsL8u3rORHKU92bSPTb4BsTuX20qJyTV9fQ0OsO8T1PvnQoHkKLVNIrCZdiC8AZc3NU2UqbHzUIY7w==} peerDependencies: @@ -14514,19 +14494,6 @@ packages: - '@swc/helpers' dev: false - /@rsbuild/plugin-svgr@0.3.1(typescript@5.3.3): - resolution: {integrity: sha512-uzlfrymQmIXMmZ8PL4OaY83V8TNDSohh+hfGElcbgVSLBZ11+lZ9weQUv/rQqX0sCjQgc9xIt+4w3DEnuus7Yg==} - dependencies: - '@rsbuild/shared': 0.3.1(@swc/helpers@0.5.3) - '@svgr/core': 8.1.0(typescript@5.3.3) - '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0) - '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0)(typescript@5.3.3) - transitivePeerDependencies: - - '@swc/helpers' - - supports-color - - typescript - dev: true - /@rsbuild/plugin-svgr@0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3)(typescript@5.3.3): resolution: {integrity: sha512-4LxjnzHNnXk3fz4Y5U+QmVY26KX7f8W8n8Pauxw1RHev5Xq9qBwRSPjs10IfA0gyy7xBKocA/O8kON8AeCbkyw==} peerDependencies: @@ -14542,7 +14509,6 @@ packages: - '@swc/helpers' - supports-color - typescript - dev: false /@rsbuild/plugin-swc@0.4.0(@rsbuild/core@0.4.0): resolution: {integrity: sha512-ENT7d+FJltbrPuVkLkIjS+o00ayZIZj6TII+2RNH2V4vhTfKk3VSxPrJclxs1iTCQS3htMlJ9kBCdXitCPPC2g==} @@ -14593,17 +14559,6 @@ packages: - '@swc/helpers' dev: false - /@rsbuild/shared@0.3.1(@swc/helpers@0.5.3): - resolution: {integrity: sha512-KXU9kYRUcZJx37qojQmmmy5XZEplPerITvWe5SU3vKUiTV2QymO+J4gIXYUF+XFyb+OyfdJkCDcSew6EyrLwWg==} - dependencies: - '@rspack/core': 0.5.0(@swc/helpers@0.5.3) - caniuse-lite: 1.0.30001566 - lodash: 4.17.21 - postcss: 8.4.31 - transitivePeerDependencies: - - '@swc/helpers' - dev: true - /@rsbuild/shared@0.4.0(@swc/helpers@0.5.3): resolution: {integrity: sha512-TlElZikaX7GhnP1VtnjPuwpgOHmi+06dNk7mZLfPIEB0ksrKewCSedTFxktEa43rGrrGUz6oBAjuxWO8j/ytCA==} dependencies: @@ -14688,14 +14643,6 @@ packages: dev: false optional: true - /@rspack/binding-darwin-arm64@0.5.0: - resolution: {integrity: sha512-zRx4efhn2eCjdhHt6avhdkKur6FZvYy1TgPhNKpWbTg7fnrvtNGzcVQCAOnPUUPkJjnss3veOhZlWJ3paX0EDQ==} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - /@rspack/binding-darwin-arm64@0.5.1: resolution: {integrity: sha512-Kc0b94ZN1ecUu2Gyj20kGLWzOrdJbeN1JUTMKZx6jlLa3m7uJ+FhRjnsqFmZ5kdK2zx722ejoKr7xkrl7hOkuw==} cpu: [arm64] @@ -14719,14 +14666,6 @@ packages: dev: false optional: true - /@rspack/binding-darwin-x64@0.5.0: - resolution: {integrity: sha512-d6SvBURfKow3WcKxTrjJPBkp+NLsuCPoIMaS8/bM4gHwgjVs2zuOsTQ9+l36dypOkjnu6QLkOIykTdiUKJ0eQg==} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - /@rspack/binding-darwin-x64@0.5.1: resolution: {integrity: sha512-iqt+3gKLBwXDsscOrwWTRrr4bTjKvNlOUIeuCIEgpvyvsq/Ez7mZl1hDpPhgqIih2X34zgFdiXuo31IsbXQWGQ==} cpu: [x64] @@ -14750,14 +14689,6 @@ packages: dev: false optional: true - /@rspack/binding-linux-arm64-gnu@0.5.0: - resolution: {integrity: sha512-97xFbF7RjJc2VvX+0Hvb7Jzsk+eEE8oEUcc5Dnb7OIwGZulWKk6cLNcRkNfmL/F9kk1QEKlUTNC/VQI7ljf2tA==} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@rspack/binding-linux-arm64-gnu@0.5.1: resolution: {integrity: sha512-H7DV7bJat2UVTVA9BkuXTAulmY1Ysn5X7KcfIVi3Vi34C1xJja2iA7MSqozFNvkm7XrJFcTMI0trwSel9mMnNw==} cpu: [arm64] @@ -14781,14 +14712,6 @@ packages: dev: false optional: true - /@rspack/binding-linux-arm64-musl@0.5.0: - resolution: {integrity: sha512-lk0IomCy276EoynmksoBwg0IcHvvVXuZPMeq7OgRPTvs33mdTExSzSTPtrGzx/D00bX1ybUqLQwJhcgGt6erPQ==} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@rspack/binding-linux-arm64-musl@0.5.1: resolution: {integrity: sha512-iRyskxvtY5QpBrkcB3nBZaErQQRRP5ActQ0qkmhHx82PUfmGgyE9Q6ww9G+CwZuOuLpd1TFQhg80TV7e2EW1uw==} cpu: [arm64] @@ -14812,14 +14735,6 @@ packages: dev: false optional: true - /@rspack/binding-linux-x64-gnu@0.5.0: - resolution: {integrity: sha512-r15ddpse0S/8wHtfL85uJrVotvPVIMnQX06KlXyGUSw1jWrjxV+NXFDJ4xXnHCvk/YV6lCFTotAssk4wJEE0Fw==} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@rspack/binding-linux-x64-gnu@0.5.1: resolution: {integrity: sha512-P047gkIshhSDNP2HRODJlYilJ+r5rh8G86wUmZmx5tnQMqYZZZYvvH0C+pOP9F23oprwsLIrR6v/nM5U7bMIVQ==} cpu: [x64] @@ -14843,14 +14758,6 @@ packages: dev: false optional: true - /@rspack/binding-linux-x64-musl@0.5.0: - resolution: {integrity: sha512-lB9Dn1bi4xyzEe6Bf/GQ7Ktlrq4Kmt1LHwN+t0m6iVYH3Vb/3g8uQGDSkwnjP8NmlAtldK1cmvRMhR7flUrgZA==} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@rspack/binding-linux-x64-musl@0.5.1: resolution: {integrity: sha512-frFHfBnEjeNNtg7OBvxDeMVtahb+ZreVrXjFp8ZMBCx7Qa9+CT1K8nUzDLQZ3wVc5shikZi1Ddts6h3BathRqA==} cpu: [x64] @@ -14874,14 +14781,6 @@ packages: dev: false optional: true - /@rspack/binding-win32-arm64-msvc@0.5.0: - resolution: {integrity: sha512-aDoF13puU8LxST/qKZndtXzlJbnbnxY2Bxyj0fu7UDh8nHJD4A2HQfWRN6BZFHaVSqM6Bnli410dJrIWeTNhZQ==} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - /@rspack/binding-win32-arm64-msvc@0.5.1: resolution: {integrity: sha512-rGDS2QIPZIYGds1GWWTIBNzvnU72CjKWKKBNQx+skFywVvs50cZ1cB78Vj4wXWzAs2hS6NPTP65mrito//hvIQ==} cpu: [arm64] @@ -14905,14 +14804,6 @@ packages: dev: false optional: true - /@rspack/binding-win32-ia32-msvc@0.5.0: - resolution: {integrity: sha512-EYGeH4YKX5v4gtTL8mBAWnsKSkF+clsKu0z1hgWgSV/vnntNlqJQZUCb5CMdg5VqadNm+lUNDYYHeHNa3+Jp3w==} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - /@rspack/binding-win32-ia32-msvc@0.5.1: resolution: {integrity: sha512-t7Cfz7V8y9DdlVd3XtUJduSXrmjst28+kqprCw9PecpOcdi0nnhmY23FjAGv7yTyhniLc4Kl3YJfk7lIHX8x9g==} cpu: [ia32] @@ -14936,14 +14827,6 @@ packages: dev: false optional: true - /@rspack/binding-win32-x64-msvc@0.5.0: - resolution: {integrity: sha512-RCECFW6otUrFiPbWQyOvLZOMNV/OL6AyAKMDbX9ejjk0TjLMrHjnhmI5X8EoA/SUc1/vEbgsJzDVLKTfn138cg==} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - /@rspack/binding-win32-x64-msvc@0.5.1: resolution: {integrity: sha512-7ruRf8oiK9u6Klwwdtcg96A4+QaJCUBd8qQOD0wcFF77Rr0JndZxngUWAU/MUKmy3VoibzFEyk019AVhCC4cXA==} cpu: [x64] @@ -14973,20 +14856,6 @@ packages: '@rspack/binding-win32-x64-msvc': 0.4.5 dev: false - /@rspack/binding@0.5.0: - resolution: {integrity: sha512-+v1elZMn6lKBqbXQzhcfeCaPzztFNGEkNDEcQ7weako6yQPsBihGCRzveMMzZkja4RyB9GRHjWRE+THm8V8+3w==} - optionalDependencies: - '@rspack/binding-darwin-arm64': 0.5.0 - '@rspack/binding-darwin-x64': 0.5.0 - '@rspack/binding-linux-arm64-gnu': 0.5.0 - '@rspack/binding-linux-arm64-musl': 0.5.0 - '@rspack/binding-linux-x64-gnu': 0.5.0 - '@rspack/binding-linux-x64-musl': 0.5.0 - '@rspack/binding-win32-arm64-msvc': 0.5.0 - '@rspack/binding-win32-ia32-msvc': 0.5.0 - '@rspack/binding-win32-x64-msvc': 0.5.0 - dev: true - /@rspack/binding@0.5.1: resolution: {integrity: sha512-2CMZ0oVBEgs+/v2nNzIEDqKS01Al//biWl0aDclh8ypeEIM9tkI/gvhjrovsnyib9oxsO3xCM4tCNCND+nx1CA==} optionalDependencies: @@ -15036,31 +14905,6 @@ packages: zod-validation-error: 1.3.1(zod@3.22.3) dev: false - /@rspack/core@0.5.0(@swc/helpers@0.5.3): - resolution: {integrity: sha512-/Bpujdtx28qYir7AK9VVSbY35GBFEcZ1NTJZBx/WIzZGZWLCxhlVYfjH8cj44y4RvXa0Y26tnj/q7VJ4U3sHug==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@swc/helpers': '>=0.5.1' - peerDependenciesMeta: - '@swc/helpers': - optional: true - dependencies: - '@module-federation/runtime-tools': 0.0.8 - '@rspack/binding': 0.5.0 - '@swc/helpers': 0.5.3 - browserslist: 4.22.2 - enhanced-resolve: 5.12.0 - graceful-fs: 4.2.10 - json-parse-even-better-errors: 3.0.0 - neo-async: 2.6.2 - tapable: 2.2.1 - terminal-link: 2.1.1 - watchpack: 2.4.0 - webpack-sources: 3.2.3 - zod: 3.22.3 - zod-validation-error: 1.3.1(zod@3.22.3) - dev: true - /@rspack/core@0.5.1(@swc/helpers@0.5.3): resolution: {integrity: sha512-fsUKPhnBCV7UOE31W03GBfqp7lSRZBcRuvLwrUt1bmTAvl9SRrR0HuWhJAs4O8LvrjKgxRzXPM8Fpysqerfo4w==} engines: {node: '>=16.0.0'} @@ -15137,17 +14981,6 @@ packages: react-refresh: 0.14.0 dev: false - /@rspack/plugin-react-refresh@0.5.0(react-refresh@0.14.0): - resolution: {integrity: sha512-Tas91XaFgRmgdLFzgeei/LybMFvnYBicMf4Y7Yt9lZHRHfgONrGbmqSVeS+nWWTW9U8Q31K9uiM2Z2a02hq2Vw==} - peerDependencies: - react-refresh: '>=0.10.0 <1.0.0' - peerDependenciesMeta: - react-refresh: - optional: true - dependencies: - react-refresh: 0.14.0 - dev: true - /@rspack/plugin-react-refresh@0.5.3(react-refresh@0.14.0): resolution: {integrity: sha512-YdEtvfLBpbbtqUO5cxM947FjdZhsTBR3Dp8djxGS1jPUZ+gJ0tOmNI5V3MZtDC/lsiSlnnKwOAImOUSQ9yV1Fw==} peerDependencies: @@ -15158,8 +14991,8 @@ packages: dependencies: react-refresh: 0.14.0 - /@rspress/core@1.11.1(typescript@5.3.3)(webpack@5.89.0): - resolution: {integrity: sha512-1lY7q1fHonJYgU4LNSJfiCOZbrIGOIjdbRLgCcn1zNDAMa+LOHPqptu5SQutO+WLCuXIeb7jM8gI9MOuxTdunA==} + /@rspress/core@1.11.2(typescript@5.3.3)(webpack@5.89.0): + resolution: {integrity: sha512-EXvc/r2fgYjWZF80EtSZ1Zl1LKB7qwEKeHBO9xU5pwfjonvW+W6zgR6H5jqHFtA7MlqDDCk36zN9h27BC/uF1A==} engines: {node: '>=14.17.6'} dependencies: '@loadable/component': 5.15.2(react@18.2.0) @@ -15167,17 +15000,17 @@ packages: '@mdx-js/mdx': 2.2.1 '@mdx-js/react': 2.2.1(react@18.2.0) '@modern-js/utils': link:packages/toolkit/utils - '@rsbuild/core': 0.3.1 - '@rsbuild/plugin-react': 0.3.1 - '@rsbuild/plugin-svgr': 0.3.1(typescript@5.3.3) + '@rsbuild/core': 0.4.0 + '@rsbuild/plugin-react': 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3) + '@rsbuild/plugin-svgr': 0.4.0(@rsbuild/core@0.4.0)(@swc/helpers@0.5.3)(typescript@5.3.3) '@rspress/mdx-rs': 0.4.3 - '@rspress/plugin-auto-nav-sidebar': 1.11.1 - '@rspress/plugin-container-syntax': 1.11.1 - '@rspress/plugin-last-updated': 1.11.1 - '@rspress/plugin-medium-zoom': 1.11.1(@rspress/runtime@1.11.1) - '@rspress/runtime': 1.11.1 - '@rspress/shared': 1.11.1 - '@rspress/theme-default': 1.11.1(webpack@5.89.0) + '@rspress/plugin-auto-nav-sidebar': 1.11.2 + '@rspress/plugin-container-syntax': 1.11.2 + '@rspress/plugin-last-updated': 1.11.2 + '@rspress/plugin-medium-zoom': 1.11.2(@rspress/runtime@1.11.2) + '@rspress/runtime': 1.11.2 + '@rspress/shared': 1.11.2 + '@rspress/theme-default': 1.11.2(webpack@5.89.0) body-scroll-lock: 4.0.0-beta.0 copy-to-clipboard: 3.3.3 enhanced-resolve: 5.12.0 @@ -15316,52 +15149,52 @@ packages: '@rspress/mdx-rs-win32-x64-msvc': 0.4.3 dev: true - /@rspress/plugin-auto-nav-sidebar@1.11.1: - resolution: {integrity: sha512-6XMPbhz19sNHi7UGZbV2xeLaN9lXM65IEI6ScqVBhnU9nbSuIexe2eme1TB7L48Msr8d3Q3du9wHgopR6IyvsQ==} + /@rspress/plugin-auto-nav-sidebar@1.11.2: + resolution: {integrity: sha512-ymDmpBdRkm5yXuN1aVs6hbSHqhk9xm26WheY8KMIZWmEA5bZRkIkYj7X51Z2l5YDy6F1nSE+Es27ihiO3cpr/A==} engines: {node: '>=14.17.6'} dependencies: - '@rspress/shared': 1.11.1 + '@rspress/shared': 1.11.2 dev: true - /@rspress/plugin-container-syntax@1.11.1: - resolution: {integrity: sha512-n4k2Xtojn3hHpWbAEUmy0n6Ph8Cn55BbZu+2DgA5XrhozDlRZLXE2QWkrcGpdvI0Ux3uixHTTFB8hrp3AaKKBQ==} + /@rspress/plugin-container-syntax@1.11.2: + resolution: {integrity: sha512-mOTR3sscp/pTpiImIp2ZvsU0/oWgIux4r2/jGDe87q3p9PBr0v5XHKmoV8numjyroVUd8RzwOSXR5v1kpCL2vQ==} engines: {node: '>=14.17.6'} dependencies: - '@rspress/shared': 1.11.1 + '@rspress/shared': 1.11.2 dev: true - /@rspress/plugin-last-updated@1.11.1: - resolution: {integrity: sha512-AxtWdCd1+7Dw05gB9f48SyopQLg2MUOZLAN01LdQ85hJMMxbFnJJQRlIEMxWAY3U8x7i7xNw5Km1Jycpoy7Sig==} + /@rspress/plugin-last-updated@1.11.2: + resolution: {integrity: sha512-zzi8iqMoL8Q2w0apM2HGzoa4M2Hhzez9SFYHnkBZYn7ZYyyyFPZXbPgS3Oee/Ysr/UmKocT4j4b038jw2sTpkA==} engines: {node: '>=14.17.6'} dependencies: - '@rspress/shared': 1.11.1 + '@rspress/shared': 1.11.2 dev: true - /@rspress/plugin-medium-zoom@1.11.1(@rspress/runtime@1.11.1): - resolution: {integrity: sha512-IF4BZE78oppsr+jV6x1xWrj8F7bQTd3NzOPRXVSp2EZivdDmTONUJdH4sgd5e32zw7uk9g4P6bM1mN5HKrTqtA==} + /@rspress/plugin-medium-zoom@1.11.2(@rspress/runtime@1.11.2): + resolution: {integrity: sha512-XwpGEvEUlGyCFt8PBwtmed9bjbSdyFcah0RWd978YXQDcMHjuKnLLqJO131cRxyX4JWccVFn8oEru5kn+LH27g==} engines: {node: '>=14.17.6'} peerDependencies: '@rspress/runtime': ^1.0.2 dependencies: - '@rspress/runtime': 1.11.1 + '@rspress/runtime': 1.11.2 medium-zoom: 1.0.8 dev: true - /@rspress/runtime@1.11.1: - resolution: {integrity: sha512-cSYAbdJTUF7cQ1qk0zvDXYcEtev0ztTSlNVL6lX9GMsYbTk5B+/dwlUbfXDO8e+bnecG5aadWC+FDKKVrGOAqg==} + /@rspress/runtime@1.11.2: + resolution: {integrity: sha512-XodcVZtk8maiZko6RAaB5EnHxz3KQLFk2zq2TRL0kVQ4PXaUSr2WEgwLMw7Siz2h5AjQlDUOPipt4AhkLTd1sw==} engines: {node: '>=14.17.6'} dependencies: - '@rspress/shared': 1.11.1 + '@rspress/shared': 1.11.2 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) react-helmet-async: 1.3.0(react-dom@18.2.0)(react@18.2.0) react-router-dom: 6.17.0(react-dom@18.2.0)(react@18.2.0) dev: true - /@rspress/shared@1.11.1: - resolution: {integrity: sha512-kl48IDNRIDwE4aJDvf8kk6VAzGRpn+WsPpEldTYN9Ov5MkwVHL/ejZr0G2AVXR2hvbp6JgsvmLVloAWWFwpi5Q==} + /@rspress/shared@1.11.2: + resolution: {integrity: sha512-ZWLGx1jDrOYkNGHtH63bTz+9t3IMo4rWvbL+5jp3jvZxB4LaixsE6YKYintGGlY1qsnXn4BYW7aItkwRyhltgg==} dependencies: - '@rsbuild/core': 0.3.1 + '@rsbuild/core': 0.4.0 chalk: 4.1.2 execa: 5.1.1 fs-extra: 11.2.0 @@ -15369,13 +15202,13 @@ packages: unified: 10.1.2 dev: true - /@rspress/theme-default@1.11.1(webpack@5.89.0): - resolution: {integrity: sha512-L4PXzIPxltwlmhdEu3HArxtBz+5NBxU/DfwfFRwVZk7V4MHBljGauhNbORszN0jEaeVYu1mU2DphMyZVAQ+ztw==} + /@rspress/theme-default@1.11.2(webpack@5.89.0): + resolution: {integrity: sha512-jkSs2PXaowadN9cr5TEQQ2IUQehk6HyesAaYrXnikxj0VkxsMLCcTd5E6jM11tzjgan4qRZdJf1T/3zuMJp22g==} engines: {node: '>=14.17.6'} dependencies: '@mdx-js/react': 2.2.1(react@18.2.0) - '@rspress/runtime': 1.11.1 - '@rspress/shared': 1.11.1 + '@rspress/runtime': 1.11.2 + '@rspress/shared': 1.11.2 body-scroll-lock: 4.0.0-beta.0 copy-to-clipboard: 3.3.3 flexsearch: 0.6.32 @@ -27485,7 +27318,6 @@ packages: postcss: ^8.1.4 dependencies: postcss: 8.4.31 - dev: true /postcss-font-variant@5.0.0(postcss@8.4.31): resolution: {integrity: sha512-1fmkBaCALD72CK2a9i468mA/+tr9/1cBxRRMXOUaZqO43oWPR5imcyPjXwuv7PXbCid4ndlP5zWhidQVVa3hmA==} @@ -30347,13 +30179,13 @@ packages: fs-extra: 11.2.0 dev: true - /rspress@1.11.1(typescript@5.3.3)(webpack@5.89.0): - resolution: {integrity: sha512-DqljMUuCGsdJBoPPknInPgYDQIrRQJnNeJdM9kansOl1oWjAPhYfGDKcHqDFEMBDRSqm3UW5EMsVTi6Ta6kKgQ==} + /rspress@1.11.2(typescript@5.3.3)(webpack@5.89.0): + resolution: {integrity: sha512-7vdPQbFdEjytzeGDaQi2g93c1AksgIY9W4qx/FLy+hJm1zgf+72TD36aqirIY350ehjgJFRHp9z+Ldz9e8t6Ng==} hasBin: true dependencies: '@modern-js/node-bundle-require': link:packages/toolkit/node-bundle-require - '@rspress/core': 1.11.1(typescript@5.3.3)(webpack@5.89.0) - '@rspress/shared': 1.11.1 + '@rspress/core': 1.11.2(typescript@5.3.3)(webpack@5.89.0) + '@rspress/shared': 1.11.2 cac: 6.7.14 chalk: 5.3.0 chokidar: 3.5.3