diff --git a/examples/module-federation/mf-host/package.json b/examples/module-federation/mf-host/package.json index f861cdbb4..6fb2ccb22 100644 --- a/examples/module-federation/mf-host/package.json +++ b/examples/module-federation/mf-host/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@module-federation/rsbuild-plugin": "^0.8.7", - "@rsbuild/core": "~1.1.13", + "@rsbuild/core": "1.2.0-alpha.0", "@rsbuild/plugin-react": "^1.1.0", "@types/react": "^19.0.2", "@types/react-dom": "^19.0.2", diff --git a/examples/module-federation/mf-remote/package.json b/examples/module-federation/mf-remote/package.json index 7182aecd0..fc244feab 100644 --- a/examples/module-federation/mf-remote/package.json +++ b/examples/module-federation/mf-remote/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@module-federation/rsbuild-plugin": "^0.8.7", - "@rsbuild/core": "~1.1.13", + "@rsbuild/core": "1.2.0-alpha.0", "@rsbuild/plugin-react": "^1.1.0", "@types/react": "^19.0.2", "@types/react-dom": "^19.0.2", diff --git a/packages/core/package.json b/packages/core/package.json index 52c875f17..bb8d72963 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -37,7 +37,7 @@ "prebundle": "prebundle" }, "dependencies": { - "@rsbuild/core": "~1.1.13", + "@rsbuild/core": "1.2.0-alpha.0", "rsbuild-plugin-dts": "workspace:*", "tinyglobby": "^0.2.10" }, diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index f8945bbfe..a4025bab7 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -544,6 +544,7 @@ const composeFormatConfig = ({ optimization: { concatenateModules: true, sideEffects: 'flag', + avoidEntryIife: true, }, output: { module: true, diff --git a/packages/core/tests/__snapshots__/config.test.ts.snap b/packages/core/tests/__snapshots__/config.test.ts.snap index 7f2f724d1..65289ae66 100644 --- a/packages/core/tests/__snapshots__/config.test.ts.snap +++ b/packages/core/tests/__snapshots__/config.test.ts.snap @@ -189,6 +189,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i "__filename": false, }, "optimization": { + "avoidEntryIife": true, "concatenateModules": true, "sideEffects": "flag", }, diff --git a/packages/create-rslib/fragments/tools/storybook-react-js/package.json b/packages/create-rslib/fragments/tools/storybook-react-js/package.json index 60b26b6d9..06fbfa102 100644 --- a/packages/create-rslib/fragments/tools/storybook-react-js/package.json +++ b/packages/create-rslib/fragments/tools/storybook-react-js/package.json @@ -4,7 +4,7 @@ "storybook": "storybook dev" }, "devDependencies": { - "@rsbuild/core": "~1.1.13", + "@rsbuild/core": "1.2.0-alpha.0", "@storybook/addon-essentials": "^8.4.7", "@storybook/addon-interactions": "^8.4.7", "@storybook/addon-links": "^8.4.7", diff --git a/packages/create-rslib/fragments/tools/storybook-react-ts/package.json b/packages/create-rslib/fragments/tools/storybook-react-ts/package.json index 60b26b6d9..06fbfa102 100644 --- a/packages/create-rslib/fragments/tools/storybook-react-ts/package.json +++ b/packages/create-rslib/fragments/tools/storybook-react-ts/package.json @@ -4,7 +4,7 @@ "storybook": "storybook dev" }, "devDependencies": { - "@rsbuild/core": "~1.1.13", + "@rsbuild/core": "1.2.0-alpha.0", "@storybook/addon-essentials": "^8.4.7", "@storybook/addon-interactions": "^8.4.7", "@storybook/addon-links": "^8.4.7", diff --git a/packages/create-rslib/template-[react]-[storybook,vitest]-js/package.json b/packages/create-rslib/template-[react]-[storybook,vitest]-js/package.json index 04f5d380c..d7e3e34c6 100644 --- a/packages/create-rslib/template-[react]-[storybook,vitest]-js/package.json +++ b/packages/create-rslib/template-[react]-[storybook,vitest]-js/package.json @@ -19,7 +19,7 @@ "test": "vitest run" }, "devDependencies": { - "@rsbuild/core": "~1.1.13", + "@rsbuild/core": "1.2.0-alpha.0", "@rsbuild/plugin-react": "^1.1.0", "@rslib/core": "workspace:*", "@storybook/addon-essentials": "^8.4.7", diff --git a/packages/create-rslib/template-[react]-[storybook,vitest]-ts/package.json b/packages/create-rslib/template-[react]-[storybook,vitest]-ts/package.json index 036d6859c..99e99cfbf 100644 --- a/packages/create-rslib/template-[react]-[storybook,vitest]-ts/package.json +++ b/packages/create-rslib/template-[react]-[storybook,vitest]-ts/package.json @@ -21,7 +21,7 @@ "test": "vitest run" }, "devDependencies": { - "@rsbuild/core": "~1.1.13", + "@rsbuild/core": "1.2.0-alpha.0", "@rsbuild/plugin-react": "^1.1.0", "@rslib/core": "workspace:*", "@storybook/addon-essentials": "^8.4.7", diff --git a/packages/create-rslib/template-[react]-[storybook]-js/package.json b/packages/create-rslib/template-[react]-[storybook]-js/package.json index b053c55a0..5e0b20506 100644 --- a/packages/create-rslib/template-[react]-[storybook]-js/package.json +++ b/packages/create-rslib/template-[react]-[storybook]-js/package.json @@ -18,7 +18,7 @@ "storybook": "storybook dev" }, "devDependencies": { - "@rsbuild/core": "~1.1.13", + "@rsbuild/core": "1.2.0-alpha.0", "@rsbuild/plugin-react": "^1.1.0", "@rslib/core": "workspace:*", "@storybook/addon-essentials": "^8.4.7", diff --git a/packages/create-rslib/template-[react]-[storybook]-ts/package.json b/packages/create-rslib/template-[react]-[storybook]-ts/package.json index 5f573471e..8a3985a79 100644 --- a/packages/create-rslib/template-[react]-[storybook]-ts/package.json +++ b/packages/create-rslib/template-[react]-[storybook]-ts/package.json @@ -20,7 +20,7 @@ "storybook": "storybook dev" }, "devDependencies": { - "@rsbuild/core": "~1.1.13", + "@rsbuild/core": "1.2.0-alpha.0", "@rsbuild/plugin-react": "^1.1.0", "@rslib/core": "workspace:*", "@storybook/addon-essentials": "^8.4.7", diff --git a/packages/plugin-dts/package.json b/packages/plugin-dts/package.json index 71a333c11..e67c7a2c5 100644 --- a/packages/plugin-dts/package.json +++ b/packages/plugin-dts/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@microsoft/api-extractor": "^7.48.1", - "@rsbuild/core": "~1.1.13", + "@rsbuild/core": "1.2.0-alpha.0", "@rslib/tsconfig": "workspace:*", "rsbuild-plugin-publint": "^0.2.1", "rslib": "npm:@rslib/core@0.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5e5b93712..446405e92 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -88,13 +88,13 @@ importers: devDependencies: '@module-federation/rsbuild-plugin': specifier: ^0.8.7 - version: 0.8.7(@module-federation/enhanced@0.8.7(@rspack/core@1.1.8(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1))(@rsbuild/core@1.1.13) + version: 0.8.7(@module-federation/enhanced@0.8.7(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1))(@rsbuild/core@1.2.0-alpha.0) '@rsbuild/core': - specifier: ~1.1.13 - version: 1.1.13 + specifier: 1.2.0-alpha.0 + version: 1.2.0-alpha.0 '@rsbuild/plugin-react': specifier: ^1.1.0 - version: 1.1.0(@rsbuild/core@1.1.13) + version: 1.1.0(@rsbuild/core@1.2.0-alpha.0) '@types/react': specifier: ^19.0.2 version: 19.0.2 @@ -109,16 +109,16 @@ importers: devDependencies: '@module-federation/enhanced': specifier: ^0.8.7 - version: 0.8.7(@rspack/core@1.1.8(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1) + version: 0.8.7(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1) '@module-federation/rsbuild-plugin': specifier: ^0.8.7 - version: 0.8.7(@module-federation/enhanced@0.8.7(@rspack/core@1.1.8(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1))(@rsbuild/core@1.1.13) + version: 0.8.7(@module-federation/enhanced@0.8.7(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1))(@rsbuild/core@1.2.0-alpha.0) '@module-federation/storybook-addon': specifier: ^3.0.18 - version: 3.0.18(@rsbuild/core@1.1.13)(@rspack/core@1.1.8(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack-virtual-modules@0.6.2)(webpack@5.96.1) + version: 3.0.18(@rsbuild/core@1.2.0-alpha.0)(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack-virtual-modules@0.6.2)(webpack@5.96.1) '@rsbuild/plugin-react': specifier: ^1.1.0 - version: 1.1.0(@rsbuild/core@1.1.13) + version: 1.1.0(@rsbuild/core@1.2.0-alpha.0) '@rslib/core': specifier: workspace:* version: link:../../../packages/core @@ -139,10 +139,10 @@ importers: version: 8.4.7(prettier@3.4.2) storybook-addon-rslib: specifier: ^0.1.7 - version: 0.1.7(@rsbuild/core@1.1.13)(@rslib/core@packages+core)(storybook-builder-rsbuild@0.1.7(@rsbuild/core@1.1.13)(@rspack/core@1.1.8(@swc/helpers@0.5.15))(@types/react@19.0.2)(storybook@8.4.7(prettier@3.4.2))(typescript@5.7.2)(webpack-sources@3.2.3))(typescript@5.7.2) + version: 0.1.7(@rsbuild/core@1.2.0-alpha.0)(@rslib/core@packages+core)(storybook-builder-rsbuild@0.1.7(@rsbuild/core@1.2.0-alpha.0)(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(@types/react@19.0.2)(storybook@8.4.7(prettier@3.4.2))(typescript@5.7.2)(webpack-sources@3.2.3))(typescript@5.7.2) storybook-react-rsbuild: specifier: ^0.1.7 - version: 0.1.7(@rsbuild/core@1.1.13)(@rspack/core@1.1.8(@swc/helpers@0.5.15))(@types/react@19.0.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(rollup@4.18.1)(storybook@8.4.7(prettier@3.4.2))(typescript@5.7.2)(webpack-sources@3.2.3)(webpack@5.96.1) + version: 0.1.7(@rsbuild/core@1.2.0-alpha.0)(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(@types/react@19.0.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(rollup@4.18.1)(storybook@8.4.7(prettier@3.4.2))(typescript@5.7.2)(webpack-sources@3.2.3)(webpack@5.96.1) examples/module-federation/mf-remote: dependencies: @@ -155,13 +155,13 @@ importers: devDependencies: '@module-federation/rsbuild-plugin': specifier: ^0.8.7 - version: 0.8.7(@module-federation/enhanced@0.8.7(@rspack/core@1.1.8(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1))(@rsbuild/core@1.1.13) + version: 0.8.7(@module-federation/enhanced@0.8.7(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1))(@rsbuild/core@1.2.0-alpha.0) '@rsbuild/core': - specifier: ~1.1.13 - version: 1.1.13 + specifier: 1.2.0-alpha.0 + version: 1.2.0-alpha.0 '@rsbuild/plugin-react': specifier: ^1.1.0 - version: 1.1.0(@rsbuild/core@1.1.13) + version: 1.1.0(@rsbuild/core@1.2.0-alpha.0) '@types/react': specifier: ^19.0.2 version: 19.0.2 @@ -176,10 +176,10 @@ importers: devDependencies: '@rsbuild/plugin-preact': specifier: ^1.2.0 - version: 1.2.0(@rsbuild/core@1.1.13)(preact@10.25.4) + version: 1.2.0(@rsbuild/core@1.2.0-alpha.0)(preact@10.25.4) '@rsbuild/plugin-sass': specifier: ^1.1.2 - version: 1.1.2(@rsbuild/core@1.1.13) + version: 1.1.2(@rsbuild/core@1.2.0-alpha.0) '@rslib/core': specifier: workspace:* version: link:../../packages/core @@ -191,10 +191,10 @@ importers: devDependencies: '@rsbuild/plugin-react': specifier: ^1.1.0 - version: 1.1.0(@rsbuild/core@1.1.13) + version: 1.1.0(@rsbuild/core@1.2.0-alpha.0) '@rsbuild/plugin-sass': specifier: ^1.1.2 - version: 1.1.2(@rsbuild/core@1.1.13) + version: 1.1.2(@rsbuild/core@1.2.0-alpha.0) '@rslib/core': specifier: workspace:* version: link:../../packages/core @@ -209,10 +209,10 @@ importers: devDependencies: '@rsbuild/plugin-react': specifier: ^1.1.0 - version: 1.1.0(@rsbuild/core@1.1.13) + version: 1.1.0(@rsbuild/core@1.2.0-alpha.0) '@rsbuild/plugin-sass': specifier: ^1.1.2 - version: 1.1.2(@rsbuild/core@1.1.13) + version: 1.1.2(@rsbuild/core@1.2.0-alpha.0) '@rslib/core': specifier: workspace:* version: link:../../packages/core @@ -227,10 +227,10 @@ importers: devDependencies: '@rsbuild/plugin-react': specifier: ^1.1.0 - version: 1.1.0(@rsbuild/core@1.1.13) + version: 1.1.0(@rsbuild/core@1.2.0-alpha.0) '@rsbuild/plugin-sass': specifier: ^1.1.2 - version: 1.1.2(@rsbuild/core@1.1.13) + version: 1.1.2(@rsbuild/core@1.2.0-alpha.0) '@rslib/core': specifier: workspace:* version: link:../../packages/core @@ -245,7 +245,7 @@ importers: devDependencies: '@rsbuild/plugin-vue': specifier: ^1.0.5 - version: 1.0.5(@rsbuild/core@1.1.13)(vue@3.5.13(typescript@5.7.2)) + version: 1.0.5(@rsbuild/core@1.2.0-alpha.0)(vue@3.5.13(typescript@5.7.2)) '@rslib/core': specifier: workspace:* version: link:../../packages/core @@ -262,8 +262,8 @@ importers: packages/core: dependencies: '@rsbuild/core': - specifier: ~1.1.13 - version: 1.1.13 + specifier: 1.2.0-alpha.0 + version: 1.2.0-alpha.0 rsbuild-plugin-dts: specifier: workspace:* version: link:../plugin-dts @@ -273,7 +273,7 @@ importers: devDependencies: '@module-federation/rsbuild-plugin': specifier: ^0.8.7 - version: 0.8.7(@module-federation/enhanced@0.8.7(@rspack/core@1.1.8(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1))(@rsbuild/core@1.1.13) + version: 0.8.7(@module-federation/enhanced@0.8.7(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1))(@rsbuild/core@1.2.0-alpha.0) '@rslib/tsconfig': specifier: workspace:* version: link:../../scripts/tsconfig @@ -300,7 +300,7 @@ importers: version: 1.2.5(typescript@5.7.2) rsbuild-plugin-publint: specifier: ^0.2.1 - version: 0.2.1(@rsbuild/core@1.1.13) + version: 0.2.1(@rsbuild/core@1.2.0-alpha.0) rslib: specifier: npm:@rslib/core@0.2.2 version: '@rslib/core@0.2.2(@microsoft/api-extractor@7.48.1(@types/node@22.8.1))(typescript@5.7.2)' @@ -364,14 +364,14 @@ importers: specifier: ^7.48.1 version: 7.48.1(@types/node@22.8.1) '@rsbuild/core': - specifier: ~1.1.13 - version: 1.1.13 + specifier: 1.2.0-alpha.0 + version: 1.2.0-alpha.0 '@rslib/tsconfig': specifier: workspace:* version: link:../../scripts/tsconfig rsbuild-plugin-publint: specifier: ^0.2.1 - version: 0.2.1(@rsbuild/core@1.1.13) + version: 0.2.1(@rsbuild/core@1.2.0-alpha.0) rslib: specifier: npm:@rslib/core@0.2.2 version: '@rslib/core@0.2.2(@microsoft/api-extractor@7.48.1(@types/node@22.8.1))(typescript@5.7.2)' @@ -395,22 +395,22 @@ importers: version: 4.0.0(vite@5.3.3(@types/node@22.8.1)(terser@5.31.6))(vitest@2.1.8(@types/node@22.8.1)(terser@5.31.6)) '@module-federation/rsbuild-plugin': specifier: ^0.8.7 - version: 0.8.7(@module-federation/enhanced@0.8.7(@rspack/core@1.1.8(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1))(@rsbuild/core@1.1.13) + version: 0.8.7(@module-federation/enhanced@0.8.7(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1))(@rsbuild/core@1.2.0-alpha.0) '@playwright/test': specifier: 1.49.1 version: 1.49.1 '@rsbuild/core': - specifier: ~1.1.13 - version: 1.1.13 + specifier: 1.2.0-alpha.0 + version: 1.2.0-alpha.0 '@rsbuild/plugin-less': specifier: ^1.1.0 - version: 1.1.0(@rsbuild/core@1.1.13) + version: 1.1.0(@rsbuild/core@1.2.0-alpha.0) '@rsbuild/plugin-react': specifier: ^1.1.0 - version: 1.1.0(@rsbuild/core@1.1.13) + version: 1.1.0(@rsbuild/core@1.2.0-alpha.0) '@rsbuild/plugin-sass': specifier: ^1.1.2 - version: 1.1.2(@rsbuild/core@1.1.13) + version: 1.1.2(@rsbuild/core@1.2.0-alpha.0) '@rslib/core': specifier: workspace:* version: link:../packages/core @@ -469,7 +469,7 @@ importers: devDependencies: '@rsbuild/plugin-react': specifier: ^1.1.0 - version: 1.1.0(@rsbuild/core@1.1.13) + version: 1.1.0(@rsbuild/core@1.2.0-alpha.0) tests/integration/asset/path: {} @@ -479,10 +479,10 @@ importers: devDependencies: '@rsbuild/plugin-react': specifier: ^1.1.0 - version: 1.1.0(@rsbuild/core@1.1.13) + version: 1.1.0(@rsbuild/core@1.2.0-alpha.0) '@rsbuild/plugin-svgr': specifier: ^1.0.6 - version: 1.0.6(@rsbuild/core@1.1.13)(typescript@5.7.2) + version: 1.0.6(@rsbuild/core@1.2.0-alpha.0)(typescript@5.7.2) tests/integration/async-chunks/default: {} @@ -565,10 +565,10 @@ importers: devDependencies: '@rsbuild/plugin-react': specifier: ^1.1.0 - version: 1.1.0(@rsbuild/core@1.1.13) + version: 1.1.0(@rsbuild/core@1.2.0-alpha.0) '@rsbuild/plugin-svgr': specifier: ^1.0.6 - version: 1.0.6(@rsbuild/core@1.1.13)(typescript@5.7.2) + version: 1.0.6(@rsbuild/core@1.2.0-alpha.0)(typescript@5.7.2) tests/integration/cli/build: {} @@ -732,7 +732,7 @@ importers: devDependencies: '@rsbuild/plugin-babel': specifier: ^1.0.3 - version: 1.0.3(@rsbuild/core@1.1.13) + version: 1.0.3(@rsbuild/core@1.2.0-alpha.0) babel-plugin-polyfill-corejs3: specifier: ^0.11.0 version: 0.11.0(@babel/core@7.26.0) @@ -874,8 +874,8 @@ importers: website: devDependencies: '@rsbuild/core': - specifier: ~1.1.13 - version: 1.1.13 + specifier: 1.2.0-alpha.0 + version: 1.2.0-alpha.0 '@rslib/tsconfig': specifier: workspace:* version: link:../scripts/tsconfig @@ -899,7 +899,7 @@ importers: version: 19.0.0(react@19.0.0) rsbuild-plugin-google-analytics: specifier: 1.0.3 - version: 1.0.3(@rsbuild/core@1.1.13) + version: 1.0.3(@rsbuild/core@1.2.0-alpha.0) rspress: specifier: 1.39.3 version: 1.39.3(webpack@5.96.1) @@ -1610,6 +1610,9 @@ packages: webpack: optional: true + '@module-federation/error-codes@0.8.4': + resolution: {integrity: sha512-55LYmrDdKb4jt+qr8qE8U3al62ZANp3FhfVaNPOaAmdTh0jHdD8M3yf5HKFlr5xVkVO4eV/F/J2NCfpbh+pEXQ==} + '@module-federation/error-codes@0.8.7': resolution: {integrity: sha512-t1UTCXCcJTL25UaYLdlc3fSKO2+oNZ9xXTQ6+GNIehxNGyxl2s0GJ6+AoL12dTTW24F1owCSrK0VjPd1MKI1gw==} @@ -1654,18 +1657,27 @@ packages: '@module-federation/runtime-tools@0.5.1': resolution: {integrity: sha512-nfBedkoZ3/SWyO0hnmaxuz0R0iGPSikHZOAZ0N/dVSQaIzlffUo35B5nlC2wgWIc0JdMZfkwkjZRrnuuDIJbzg==} + '@module-federation/runtime-tools@0.8.4': + resolution: {integrity: sha512-fjVOsItJ1u5YY6E9FnS56UDwZgqEQUrWFnouRiPtK123LUuqUI9FH4redZoKWlE1PB0ir1Z3tnqy8eFYzPO38Q==} + '@module-federation/runtime-tools@0.8.7': resolution: {integrity: sha512-U3OphMbG2RPcfCFWzPDhI0sXYtYoJtaODig6sxkHKvID1q0sBmIjcQkPEAK3LESFH83JZYc6WCf6OaZSyqAmHQ==} '@module-federation/runtime@0.5.1': resolution: {integrity: sha512-xgiMUWwGLWDrvZc9JibuEbXIbhXg6z2oUkemogSvQ4LKvrl/n0kbqP1Blk669mXzyWbqtSp6PpvNdwaE1aN5xQ==} + '@module-federation/runtime@0.8.4': + resolution: {integrity: sha512-yZeZ7z2Rx4gv/0E97oLTF3V6N25vglmwXGgoeju/W2YjsFvWzVtCDI7zRRb0mJhU6+jmSM8jP1DeQGbea/AiZQ==} + '@module-federation/runtime@0.8.7': resolution: {integrity: sha512-ECyKfak23De5tNXUcFj7W+MsV/gimJxrds3UuaLdDgcJeu/rymPsdygCjhKFpHqkrQwm4RvXr26ZpH1//XiX0w==} '@module-federation/sdk@0.5.1': resolution: {integrity: sha512-exvchtjNURJJkpqjQ3/opdbfeT2wPKvrbnGnyRkrwW5o3FH1LaST1tkiNviT6OXTexGaVc2DahbdniQHVtQ7pA==} + '@module-federation/sdk@0.8.4': + resolution: {integrity: sha512-waABomIjg/5m1rPDBWYG4KUhS5r7OUUY7S+avpaVIY/tkPWB3ibRDKy2dNLLAMaLKq0u+B1qIdEp4NIWkqhqpg==} + '@module-federation/sdk@0.8.7': resolution: {integrity: sha512-yTnGR7bKYvksqTKDvd/PDJLELp0GtgmKA0Et5IBLoqxYt143XRBu14wSP15qTpV7fDnB/yjvNR6+9l7E7724Ng==} @@ -1704,6 +1716,9 @@ packages: '@module-federation/webpack-bundler-runtime@0.5.1': resolution: {integrity: sha512-mMhRFH0k2VjwHt3Jol9JkUsmI/4XlrAoBG3E0o7HoyoPYv1UFOWyqAflfANcUPgbYpvqmyLzDcO+3IT36LXnrA==} + '@module-federation/webpack-bundler-runtime@0.8.4': + resolution: {integrity: sha512-HggROJhvHPUX7uqBD/XlajGygMNM1DG0+4OAkk8MBQe4a18QzrRNzZt6XQbRTSG4OaEoyRWhQHvYD3Yps405tQ==} + '@module-federation/webpack-bundler-runtime@0.8.7': resolution: {integrity: sha512-+U63+tRNuImws1oESkc8FDB5SoJgksUCBeCImFZwV6ENB5Wvb0WxAV78nHL9Vm9mTXTTADt5UveSB8JO+TL6BA==} @@ -1904,6 +1919,11 @@ packages: engines: {node: '>=16.7.0'} hasBin: true + '@rsbuild/core@1.2.0-alpha.0': + resolution: {integrity: sha512-/MkOgsZfu3KpKcHif1wtEwp0ybaCj+PtJgetmuXwxe44HlaaFNY6Znj+PdgVT/4oelkwz0XS7DX7BogoSYl7og==} + engines: {node: '>=16.7.0'} + hasBin: true + '@rsbuild/plugin-babel@1.0.3': resolution: {integrity: sha512-3S/ykXv7KRo0FxVpkjoHFUwB04nKINIET1kuv4xiRaDmeww1Tp0wl9h4u8a7d7gU/4FllyoUflY8TVhci/o05g==} peerDependencies: @@ -1973,49 +1993,97 @@ packages: cpu: [arm64] os: [darwin] + '@rspack/binding-darwin-arm64@1.2.0-alpha.0': + resolution: {integrity: sha512-EPprIe6BrkJ9XuWL5HBXJFaH4vvt5C2kBTvyu+t5E3wacyH9A0gIDaMOEmH30Kt3zl4B07OCBC1nCiJ1sTtimw==} + cpu: [arm64] + os: [darwin] + '@rspack/binding-darwin-x64@1.1.8': resolution: {integrity: sha512-vfqf/c+mcx8rr1M8LnqKmzDdnrgguflZnjGerBLjNerAc+dcUp3lCvNxRIvZ2TkSZZBW8BpCMgjj3n70CZ4VLQ==} cpu: [x64] os: [darwin] + '@rspack/binding-darwin-x64@1.2.0-alpha.0': + resolution: {integrity: sha512-ACwdgWg0V9j0o3gs1wvhqRJ4xui82L+Fii9Fa74az7P974iWO0ZHw4QIUaO5r434+v9OWMqpyBRN1M7cBrx3GA==} + cpu: [x64] + os: [darwin] + '@rspack/binding-linux-arm64-gnu@1.1.8': resolution: {integrity: sha512-lZlO/rAJSeozi+qtVLkGSXfe+riPawCwM4FsrflELfNlvvEXpANwtrdJ+LsaNVXcgvhh50ZX2KicTdmx9G2b6Q==} cpu: [arm64] os: [linux] + '@rspack/binding-linux-arm64-gnu@1.2.0-alpha.0': + resolution: {integrity: sha512-Ex9SviDikz9E36R4I5si/626FsYOJ35l1Lb+DCRUijjjsvoq4k8Shi8csyBfubR+JZ1M0uOXjJftu1Gm5z8Q0Q==} + cpu: [arm64] + os: [linux] + '@rspack/binding-linux-arm64-musl@1.1.8': resolution: {integrity: sha512-bX7exULSZwy8xtDh6Z65b6sRC4uSxGuyvSLCEKyhmG6AnJkg0gQMxk3hoO0hWnyGEZgdJEn+jEhk0fjl+6ZRAQ==} cpu: [arm64] os: [linux] + '@rspack/binding-linux-arm64-musl@1.2.0-alpha.0': + resolution: {integrity: sha512-U320xZmTcTwQ0BR8yIzE1L4olMCqzYkT3VFjXPR6iok/Mj0xjfk/SiKhLoZml473qQrHSGaFJ321cp02zgTFJg==} + cpu: [arm64] + os: [linux] + '@rspack/binding-linux-x64-gnu@1.1.8': resolution: {integrity: sha512-2Prw2USgTJ3aLdLExfik8pAwAHbX4MZrACBGEmR7Vbb56kLjC+++fXkciRc50pUDK4JFr1VQ7eNZrJuDR6GG6Q==} cpu: [x64] os: [linux] + '@rspack/binding-linux-x64-gnu@1.2.0-alpha.0': + resolution: {integrity: sha512-GNur7VXJ29NtJhY8PYgv3Fv1Zxbx0XZhDUj/+7Wp40CAXRFsLgXScZIRh2U30TECYaihboZ7BD+xugv8MQPDoA==} + cpu: [x64] + os: [linux] + '@rspack/binding-linux-x64-musl@1.1.8': resolution: {integrity: sha512-bnVGB/mQBKEdzOU/CPmcOE3qEXxGOGGW7/i6iLl2MamVOykJq8fYjL9j86yi6L0r009ja16OgWckykQGc4UqGw==} cpu: [x64] os: [linux] + '@rspack/binding-linux-x64-musl@1.2.0-alpha.0': + resolution: {integrity: sha512-0IdswzpG9+sgxvGu7KTwSeqfV0hvciaHMoZvGklfZa2txpcUqAg4ASp7uxrNaUo+G2a1fTUMOtP9351Cnl8DBg==} + cpu: [x64] + os: [linux] + '@rspack/binding-win32-arm64-msvc@1.1.8': resolution: {integrity: sha512-u+na3gxhzeksm4xZyAzn1+XWo5a5j7hgWA/KcFPDQ8qQNkRknx4jnQMxVtcZ9pLskAYV4AcOV/AIximx7zvv8A==} cpu: [arm64] os: [win32] + '@rspack/binding-win32-arm64-msvc@1.2.0-alpha.0': + resolution: {integrity: sha512-FcFgoWGjSrCfJwDZY5bDA2aO02l5BP7qdyW6ehjwBiMxNZyeSbGvKz3jXl5TtTHR1IgdLzi9kEJkTPYLLMiE1A==} + cpu: [arm64] + os: [win32] + '@rspack/binding-win32-ia32-msvc@1.1.8': resolution: {integrity: sha512-FijUxym1INd5fFHwVCLuVP8XEAb4Sk1sMwEEQUlugiDra9ZsLaPw4OgPGxbxkD6SB0DeUz9Zq46Xbcf6d3OgfA==} cpu: [ia32] os: [win32] + '@rspack/binding-win32-ia32-msvc@1.2.0-alpha.0': + resolution: {integrity: sha512-cZYFJw6DKCaPPz9VDJPndZ9KSp+/eedgt11Mv8OTpq+MJTUjB2HjtcjqJh8xxVcp3IuwvSMndTkC69WWt/4feA==} + cpu: [ia32] + os: [win32] + '@rspack/binding-win32-x64-msvc@1.1.8': resolution: {integrity: sha512-SBzIcND4qpDt71jlu1MCDxt335tqInT3YID9V4DoQ4t8wgM/uad7EgKOWKTK6vc2RRaOIShfS2XzqjNUxPXh4w==} cpu: [x64] os: [win32] + '@rspack/binding-win32-x64-msvc@1.2.0-alpha.0': + resolution: {integrity: sha512-gfOqb/rq5716NV+Vbk5MteBhV4VhJeSoh2+dRQjdy4EN1wPZ+Uebs9ORVrT9uRjY3JrPn/5PkAHJXtgaOA9Uyg==} + cpu: [x64] + os: [win32] + '@rspack/binding@1.1.8': resolution: {integrity: sha512-+/JzXx1HctfgPj+XtsCTbRkxiaOfAXGZZLEvs7jgp04WgWRSZ5u97WRCePNPvy+sCfOEH/2zw2ZK36Z7oQRGhQ==} + '@rspack/binding@1.2.0-alpha.0': + resolution: {integrity: sha512-rtmDScjtGUxv1zA1m3jXecuX2LsgNp4aWaAjOowHasoO1YqfHK0fMyprCiPowTjoHtpZ7Xt/tnMhii0GlGIITQ==} + '@rspack/core@1.1.8': resolution: {integrity: sha512-pcZtcj5iXLCuw9oElTYC47bp/RQADm/MMEb3djHdwJuSlFWfWPQi5QFgJ/lJAxIW9UNHnTFrYtytycfjpuoEcA==} engines: {node: '>=16.0.0'} @@ -2025,6 +2093,15 @@ packages: '@swc/helpers': optional: true + '@rspack/core@1.2.0-alpha.0': + resolution: {integrity: sha512-YiD0vFDj+PfHs3ZqJwPNhTYyVTb4xR6FpOI5WJ4jJHV4lgdErS+RChTCPhf1xeqxfuTSSnFA7UeqosLhBuNSqQ==} + engines: {node: '>=16.0.0'} + peerDependencies: + '@swc/helpers': '>=0.5.1' + peerDependenciesMeta: + '@swc/helpers': + optional: true + '@rspack/lite-tapable@1.0.1': resolution: {integrity: sha512-VynGOEsVw2s8TAlLf/uESfrgfrq2+rcXB1muPJYBWbsm1Oa6r5qVQhjA5ggM6z/coYPrsVMgovl3Ff7Q7OCp1w==} engines: {node: '>=16.0.0'} @@ -4225,6 +4302,10 @@ packages: resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} engines: {node: '>=0.10.0'} + isomorphic-rslog@0.0.6: + resolution: {integrity: sha512-HM0q6XqQ93psDlqvuViNs/Ea3hAyGDkIdVAHlrEocjjAwGrs1fZ+EdQjS9eUPacnYB7Y8SoDdSY3H8p3ce205A==} + engines: {node: '>=14.17.6'} + isomorphic-rslog@0.0.7: resolution: {integrity: sha512-n6/XnKnZ5eLEj6VllG4XmamXG7/F69nls8dcynHyhcTpsPUYgcgx4ifEaCo4lQJ2uzwfmIT+F0KBGwBcMKmt5g==} engines: {node: '>=14.17.6'} @@ -7313,7 +7394,7 @@ snapshots: - supports-color - utf-8-validate - '@module-federation/enhanced@0.8.7(@rspack/core@1.1.8(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1)': + '@module-federation/enhanced@0.8.7(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1)': dependencies: '@module-federation/bridge-react-webpack-plugin': 0.8.7 '@module-federation/data-prefetch': 0.8.7(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -7322,7 +7403,7 @@ snapshots: '@module-federation/inject-external-runtime-core-plugin': 0.8.7(@module-federation/runtime-tools@0.8.7) '@module-federation/managers': 0.8.7 '@module-federation/manifest': 0.8.7(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2)) - '@module-federation/rspack': 0.8.7(@rspack/core@1.1.8(@swc/helpers@0.5.15))(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2)) + '@module-federation/rspack': 0.8.7(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2)) '@module-federation/runtime-tools': 0.8.7 '@module-federation/sdk': 0.8.7 btoa: 1.2.1 @@ -7340,6 +7421,8 @@ snapshots: - supports-color - utf-8-validate + '@module-federation/error-codes@0.8.4': {} + '@module-federation/error-codes@0.8.7': {} '@module-federation/inject-external-runtime-core-plugin@0.8.7(@module-federation/runtime-tools@0.8.7)': @@ -7367,14 +7450,14 @@ snapshots: - utf-8-validate - vue-tsc - '@module-federation/rsbuild-plugin@0.8.7(@module-federation/enhanced@0.8.7(@rspack/core@1.1.8(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1))(@rsbuild/core@1.1.13)': + '@module-federation/rsbuild-plugin@0.8.7(@module-federation/enhanced@0.8.7(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1))(@rsbuild/core@1.2.0-alpha.0)': dependencies: '@module-federation/sdk': 0.8.7 optionalDependencies: - '@module-federation/enhanced': 0.8.7(@rspack/core@1.1.8(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1) - '@rsbuild/core': 1.1.13 + '@module-federation/enhanced': 0.8.7(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1) + '@rsbuild/core': 1.2.0-alpha.0 - '@module-federation/rspack@0.8.7(@rspack/core@1.1.8(@swc/helpers@0.5.15))(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))': + '@module-federation/rspack@0.8.7(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))': dependencies: '@module-federation/bridge-react-webpack-plugin': 0.8.7 '@module-federation/dts-plugin': 0.8.7(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2)) @@ -7383,7 +7466,7 @@ snapshots: '@module-federation/manifest': 0.8.7(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2)) '@module-federation/runtime-tools': 0.8.7 '@module-federation/sdk': 0.8.7 - '@rspack/core': 1.1.8(@swc/helpers@0.5.15) + '@rspack/core': 1.2.0-alpha.0(@swc/helpers@0.5.15) optionalDependencies: typescript: 5.7.2 vue-tsc: 2.2.0(typescript@5.7.2) @@ -7403,6 +7486,11 @@ snapshots: '@module-federation/runtime': 0.5.1 '@module-federation/webpack-bundler-runtime': 0.5.1 + '@module-federation/runtime-tools@0.8.4': + dependencies: + '@module-federation/runtime': 0.8.4 + '@module-federation/webpack-bundler-runtime': 0.8.4 + '@module-federation/runtime-tools@0.8.7': dependencies: '@module-federation/runtime': 0.8.7 @@ -7412,6 +7500,11 @@ snapshots: dependencies: '@module-federation/sdk': 0.5.1 + '@module-federation/runtime@0.8.4': + dependencies: + '@module-federation/error-codes': 0.8.4 + '@module-federation/sdk': 0.8.4 + '@module-federation/runtime@0.8.7': dependencies: '@module-federation/error-codes': 0.8.7 @@ -7420,16 +7513,20 @@ snapshots: '@module-federation/sdk@0.5.1': {} + '@module-federation/sdk@0.8.4': + dependencies: + isomorphic-rslog: 0.0.6 + '@module-federation/sdk@0.8.7': dependencies: isomorphic-rslog: 0.0.7 - '@module-federation/storybook-addon@3.0.18(@rsbuild/core@1.1.13)(@rspack/core@1.1.8(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack-virtual-modules@0.6.2)(webpack@5.96.1)': + '@module-federation/storybook-addon@3.0.18(@rsbuild/core@1.2.0-alpha.0)(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack-virtual-modules@0.6.2)(webpack@5.96.1)': dependencies: - '@module-federation/enhanced': 0.8.7(@rspack/core@1.1.8(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1) + '@module-federation/enhanced': 0.8.7(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(webpack@5.96.1) '@module-federation/sdk': 0.8.7 optionalDependencies: - '@rsbuild/core': 1.1.13 + '@rsbuild/core': 1.2.0-alpha.0 webpack: 5.96.1 webpack-virtual-modules: 0.6.2 transitivePeerDependencies: @@ -7454,6 +7551,11 @@ snapshots: '@module-federation/runtime': 0.5.1 '@module-federation/sdk': 0.5.1 + '@module-federation/webpack-bundler-runtime@0.8.4': + dependencies: + '@module-federation/runtime': 0.8.4 + '@module-federation/sdk': 0.8.4 + '@module-federation/webpack-bundler-runtime@0.8.7': dependencies: '@module-federation/runtime': 0.8.7 @@ -7589,13 +7691,20 @@ snapshots: '@swc/helpers': 0.5.15 core-js: 3.39.0 - '@rsbuild/plugin-babel@1.0.3(@rsbuild/core@1.1.13)': + '@rsbuild/core@1.2.0-alpha.0': + dependencies: + '@rspack/core': 1.2.0-alpha.0(@swc/helpers@0.5.15) + '@rspack/lite-tapable': 1.0.1 + '@swc/helpers': 0.5.15 + core-js: 3.39.0 + + '@rsbuild/plugin-babel@1.0.3(@rsbuild/core@1.2.0-alpha.0)': dependencies: '@babel/core': 7.26.0 '@babel/plugin-proposal-decorators': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-class-properties': 7.25.9(@babel/core@7.26.0) '@babel/preset-typescript': 7.26.0(@babel/core@7.26.0) - '@rsbuild/core': 1.1.13 + '@rsbuild/core': 1.2.0-alpha.0 '@types/babel__core': 7.20.5 deepmerge: 4.3.1 reduce-configs: 1.1.0 @@ -7609,6 +7718,12 @@ snapshots: deepmerge: 4.3.1 reduce-configs: 1.1.0 + '@rsbuild/plugin-less@1.1.0(@rsbuild/core@1.2.0-alpha.0)': + dependencies: + '@rsbuild/core': 1.2.0-alpha.0 + deepmerge: 4.3.1 + reduce-configs: 1.1.0 + '@rsbuild/plugin-node-polyfill@1.2.0(@rsbuild/core@1.1.13)': dependencies: assert: 2.1.0 @@ -7637,11 +7752,11 @@ snapshots: optionalDependencies: '@rsbuild/core': 1.1.13 - '@rsbuild/plugin-preact@1.2.0(@rsbuild/core@1.1.13)(preact@10.25.4)': + '@rsbuild/plugin-preact@1.2.0(@rsbuild/core@1.2.0-alpha.0)(preact@10.25.4)': dependencies: '@prefresh/core': 1.5.3(preact@10.25.4) '@prefresh/utils': 1.2.0 - '@rsbuild/core': 1.1.13 + '@rsbuild/core': 1.2.0-alpha.0 '@rspack/plugin-preact-refresh': 1.1.1(@prefresh/core@1.5.3(preact@10.25.4))(@prefresh/utils@1.2.0) '@swc/plugin-prefresh': 5.0.0 transitivePeerDependencies: @@ -7653,6 +7768,12 @@ snapshots: '@rspack/plugin-react-refresh': 1.0.0(react-refresh@0.16.0) react-refresh: 0.16.0 + '@rsbuild/plugin-react@1.1.0(@rsbuild/core@1.2.0-alpha.0)': + dependencies: + '@rsbuild/core': 1.2.0-alpha.0 + '@rspack/plugin-react-refresh': 1.0.0(react-refresh@0.16.0) + react-refresh: 0.16.0 + '@rsbuild/plugin-sass@1.1.2(@rsbuild/core@1.1.13)': dependencies: '@rsbuild/core': 1.1.13 @@ -7662,10 +7783,19 @@ snapshots: reduce-configs: 1.1.0 sass-embedded: 1.82.0 - '@rsbuild/plugin-svgr@1.0.6(@rsbuild/core@1.1.13)(typescript@5.7.2)': + '@rsbuild/plugin-sass@1.1.2(@rsbuild/core@1.2.0-alpha.0)': dependencies: - '@rsbuild/core': 1.1.13 - '@rsbuild/plugin-react': 1.1.0(@rsbuild/core@1.1.13) + '@rsbuild/core': 1.2.0-alpha.0 + deepmerge: 4.3.1 + loader-utils: 2.0.4 + postcss: 8.4.49 + reduce-configs: 1.1.0 + sass-embedded: 1.82.0 + + '@rsbuild/plugin-svgr@1.0.6(@rsbuild/core@1.2.0-alpha.0)(typescript@5.7.2)': + dependencies: + '@rsbuild/core': 1.2.0-alpha.0 + '@rsbuild/plugin-react': 1.1.0(@rsbuild/core@1.2.0-alpha.0) '@svgr/core': 8.1.0(typescript@5.7.2) '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.7.2)) '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@5.7.2))(typescript@5.7.2) @@ -7675,21 +7805,21 @@ snapshots: - supports-color - typescript - '@rsbuild/plugin-type-check@1.1.0(@rsbuild/core@1.1.13)(@rspack/core@1.1.8(@swc/helpers@0.5.15))(typescript@5.7.2)': + '@rsbuild/plugin-type-check@1.1.0(@rsbuild/core@1.2.0-alpha.0)(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(typescript@5.7.2)': dependencies: deepmerge: 4.3.1 json5: 2.2.3 reduce-configs: 1.1.0 - ts-checker-rspack-plugin: 1.0.3(@rspack/core@1.1.8(@swc/helpers@0.5.15))(typescript@5.7.2) + ts-checker-rspack-plugin: 1.0.3(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(typescript@5.7.2) optionalDependencies: - '@rsbuild/core': 1.1.13 + '@rsbuild/core': 1.2.0-alpha.0 transitivePeerDependencies: - '@rspack/core' - typescript - '@rsbuild/plugin-vue@1.0.5(@rsbuild/core@1.1.13)(vue@3.5.13(typescript@5.7.2))': + '@rsbuild/plugin-vue@1.0.5(@rsbuild/core@1.2.0-alpha.0)(vue@3.5.13(typescript@5.7.2))': dependencies: - '@rsbuild/core': 1.1.13 + '@rsbuild/core': 1.2.0-alpha.0 vue-loader: 17.4.2(vue@3.5.13(typescript@5.7.2))(webpack@5.96.1) webpack: 5.96.1 transitivePeerDependencies: @@ -7712,30 +7842,57 @@ snapshots: '@rspack/binding-darwin-arm64@1.1.8': optional: true + '@rspack/binding-darwin-arm64@1.2.0-alpha.0': + optional: true + '@rspack/binding-darwin-x64@1.1.8': optional: true + '@rspack/binding-darwin-x64@1.2.0-alpha.0': + optional: true + '@rspack/binding-linux-arm64-gnu@1.1.8': optional: true + '@rspack/binding-linux-arm64-gnu@1.2.0-alpha.0': + optional: true + '@rspack/binding-linux-arm64-musl@1.1.8': optional: true + '@rspack/binding-linux-arm64-musl@1.2.0-alpha.0': + optional: true + '@rspack/binding-linux-x64-gnu@1.1.8': optional: true + '@rspack/binding-linux-x64-gnu@1.2.0-alpha.0': + optional: true + '@rspack/binding-linux-x64-musl@1.1.8': optional: true + '@rspack/binding-linux-x64-musl@1.2.0-alpha.0': + optional: true + '@rspack/binding-win32-arm64-msvc@1.1.8': optional: true + '@rspack/binding-win32-arm64-msvc@1.2.0-alpha.0': + optional: true + '@rspack/binding-win32-ia32-msvc@1.1.8': optional: true + '@rspack/binding-win32-ia32-msvc@1.2.0-alpha.0': + optional: true + '@rspack/binding-win32-x64-msvc@1.1.8': optional: true + '@rspack/binding-win32-x64-msvc@1.2.0-alpha.0': + optional: true + '@rspack/binding@1.1.8': optionalDependencies: '@rspack/binding-darwin-arm64': 1.1.8 @@ -7748,6 +7905,18 @@ snapshots: '@rspack/binding-win32-ia32-msvc': 1.1.8 '@rspack/binding-win32-x64-msvc': 1.1.8 + '@rspack/binding@1.2.0-alpha.0': + optionalDependencies: + '@rspack/binding-darwin-arm64': 1.2.0-alpha.0 + '@rspack/binding-darwin-x64': 1.2.0-alpha.0 + '@rspack/binding-linux-arm64-gnu': 1.2.0-alpha.0 + '@rspack/binding-linux-arm64-musl': 1.2.0-alpha.0 + '@rspack/binding-linux-x64-gnu': 1.2.0-alpha.0 + '@rspack/binding-linux-x64-musl': 1.2.0-alpha.0 + '@rspack/binding-win32-arm64-msvc': 1.2.0-alpha.0 + '@rspack/binding-win32-ia32-msvc': 1.2.0-alpha.0 + '@rspack/binding-win32-x64-msvc': 1.2.0-alpha.0 + '@rspack/core@1.1.8(@swc/helpers@0.5.15)': dependencies: '@module-federation/runtime-tools': 0.5.1 @@ -7757,6 +7926,15 @@ snapshots: optionalDependencies: '@swc/helpers': 0.5.15 + '@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15)': + dependencies: + '@module-federation/runtime-tools': 0.8.4 + '@rspack/binding': 1.2.0-alpha.0 + '@rspack/lite-tapable': 1.0.1 + caniuse-lite: 1.0.30001680 + optionalDependencies: + '@swc/helpers': 0.5.15 + '@rspack/lite-tapable@1.0.1': {} '@rspack/plugin-preact-refresh@1.1.1(@prefresh/core@1.5.3(preact@10.25.4))(@prefresh/utils@1.2.0)': @@ -10258,6 +10436,8 @@ snapshots: isobject@3.0.1: {} + isomorphic-rslog@0.0.6: {} + isomorphic-rslog@0.0.7: {} isomorphic-ws@5.0.0(ws@8.18.0): @@ -11832,16 +12012,16 @@ snapshots: '@microsoft/api-extractor': 7.48.1(@types/node@22.8.1) typescript: 5.7.2 - rsbuild-plugin-google-analytics@1.0.3(@rsbuild/core@1.1.13): + rsbuild-plugin-google-analytics@1.0.3(@rsbuild/core@1.2.0-alpha.0): optionalDependencies: - '@rsbuild/core': 1.1.13 + '@rsbuild/core': 1.2.0-alpha.0 - rsbuild-plugin-html-minifier-terser@1.1.1(@rsbuild/core@1.1.13): + rsbuild-plugin-html-minifier-terser@1.1.1(@rsbuild/core@1.2.0-alpha.0): dependencies: '@types/html-minifier-terser': 7.0.2 html-minifier-terser: 7.2.0 optionalDependencies: - '@rsbuild/core': 1.1.13 + '@rsbuild/core': 1.2.0-alpha.0 rsbuild-plugin-publint@0.2.1(@rsbuild/core@1.1.13): dependencies: @@ -11850,6 +12030,13 @@ snapshots: optionalDependencies: '@rsbuild/core': 1.1.13 + rsbuild-plugin-publint@0.2.1(@rsbuild/core@1.2.0-alpha.0): + dependencies: + picocolors: 1.1.1 + publint: 0.2.12 + optionalDependencies: + '@rsbuild/core': 1.2.0-alpha.0 + rslog@1.2.3: {} rspack-plugin-virtual-module@0.1.13: @@ -12166,18 +12353,18 @@ snapshots: stdin-discarder@0.2.2: {} - storybook-addon-rslib@0.1.7(@rsbuild/core@1.1.13)(@rslib/core@packages+core)(storybook-builder-rsbuild@0.1.7(@rsbuild/core@1.1.13)(@rspack/core@1.1.8(@swc/helpers@0.5.15))(@types/react@19.0.2)(storybook@8.4.7(prettier@3.4.2))(typescript@5.7.2)(webpack-sources@3.2.3))(typescript@5.7.2): + storybook-addon-rslib@0.1.7(@rsbuild/core@1.2.0-alpha.0)(@rslib/core@packages+core)(storybook-builder-rsbuild@0.1.7(@rsbuild/core@1.2.0-alpha.0)(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(@types/react@19.0.2)(storybook@8.4.7(prettier@3.4.2))(typescript@5.7.2)(webpack-sources@3.2.3))(typescript@5.7.2): dependencies: - '@rsbuild/core': 1.1.13 + '@rsbuild/core': 1.2.0-alpha.0 '@rslib/core': link:packages/core - storybook-builder-rsbuild: 0.1.7(@rsbuild/core@1.1.13)(@rspack/core@1.1.8(@swc/helpers@0.5.15))(@types/react@19.0.2)(storybook@8.4.7(prettier@3.4.2))(typescript@5.7.2)(webpack-sources@3.2.3) + storybook-builder-rsbuild: 0.1.7(@rsbuild/core@1.2.0-alpha.0)(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(@types/react@19.0.2)(storybook@8.4.7(prettier@3.4.2))(typescript@5.7.2)(webpack-sources@3.2.3) optionalDependencies: typescript: 5.7.2 - storybook-builder-rsbuild@0.1.7(@rsbuild/core@1.1.13)(@rspack/core@1.1.8(@swc/helpers@0.5.15))(@types/react@19.0.2)(storybook@8.4.7(prettier@3.4.2))(typescript@5.7.2)(webpack-sources@3.2.3): + storybook-builder-rsbuild@0.1.7(@rsbuild/core@1.2.0-alpha.0)(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(@types/react@19.0.2)(storybook@8.4.7(prettier@3.4.2))(typescript@5.7.2)(webpack-sources@3.2.3): dependencies: - '@rsbuild/core': 1.1.13 - '@rsbuild/plugin-type-check': 1.1.0(@rsbuild/core@1.1.13)(@rspack/core@1.1.8(@swc/helpers@0.5.15))(typescript@5.7.2) + '@rsbuild/core': 1.2.0-alpha.0 + '@rsbuild/plugin-type-check': 1.1.0(@rsbuild/core@1.2.0-alpha.0)(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(typescript@5.7.2) '@storybook/addon-docs': 8.4.2(@types/react@19.0.2)(storybook@8.4.7(prettier@3.4.2))(webpack-sources@3.2.3) '@storybook/core-webpack': 8.4.2(storybook@8.4.7(prettier@3.4.2)) browser-assert: 1.2.1 @@ -12190,7 +12377,7 @@ snapshots: magic-string: 0.30.17 path-browserify: 1.0.1 process: 0.11.10 - rsbuild-plugin-html-minifier-terser: 1.1.1(@rsbuild/core@1.1.13) + rsbuild-plugin-html-minifier-terser: 1.1.1(@rsbuild/core@1.2.0-alpha.0) sirv: 2.0.4 storybook: 8.4.7(prettier@3.4.2) ts-dedent: 2.2.0 @@ -12204,10 +12391,10 @@ snapshots: - '@types/react' - webpack-sources - storybook-react-rsbuild@0.1.7(@rsbuild/core@1.1.13)(@rspack/core@1.1.8(@swc/helpers@0.5.15))(@types/react@19.0.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(rollup@4.18.1)(storybook@8.4.7(prettier@3.4.2))(typescript@5.7.2)(webpack-sources@3.2.3)(webpack@5.96.1): + storybook-react-rsbuild@0.1.7(@rsbuild/core@1.2.0-alpha.0)(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(@types/react@19.0.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(rollup@4.18.1)(storybook@8.4.7(prettier@3.4.2))(typescript@5.7.2)(webpack-sources@3.2.3)(webpack@5.96.1): dependencies: '@rollup/pluginutils': 5.1.4(rollup@4.18.1) - '@rsbuild/core': 1.1.13 + '@rsbuild/core': 1.2.0-alpha.0 '@storybook/react': 8.4.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.4.7(prettier@3.4.2))(typescript@5.7.2) '@storybook/react-docgen-typescript-plugin': 1.0.1(typescript@5.7.2)(webpack@5.96.1) '@types/node': 18.19.64 @@ -12218,7 +12405,7 @@ snapshots: react-dom: 19.0.0(react@19.0.0) resolve: 1.22.10 storybook: 8.4.7(prettier@3.4.2) - storybook-builder-rsbuild: 0.1.7(@rsbuild/core@1.1.13)(@rspack/core@1.1.8(@swc/helpers@0.5.15))(@types/react@19.0.2)(storybook@8.4.7(prettier@3.4.2))(typescript@5.7.2)(webpack-sources@3.2.3) + storybook-builder-rsbuild: 0.1.7(@rsbuild/core@1.2.0-alpha.0)(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(@types/react@19.0.2)(storybook@8.4.7(prettier@3.4.2))(typescript@5.7.2)(webpack-sources@3.2.3) tsconfig-paths: 4.2.0 optionalDependencies: typescript: 5.7.2 @@ -12485,7 +12672,7 @@ snapshots: trough@2.2.0: {} - ts-checker-rspack-plugin@1.0.3(@rspack/core@1.1.8(@swc/helpers@0.5.15))(typescript@5.7.2): + ts-checker-rspack-plugin@1.0.3(@rspack/core@1.2.0-alpha.0(@swc/helpers@0.5.15))(typescript@5.7.2): dependencies: '@babel/code-frame': 7.26.2 '@rspack/lite-tapable': 1.0.1 @@ -12495,7 +12682,7 @@ snapshots: picocolors: 1.1.1 typescript: 5.7.2 optionalDependencies: - '@rspack/core': 1.1.8(@swc/helpers@0.5.15) + '@rspack/core': 1.2.0-alpha.0(@swc/helpers@0.5.15) ts-dedent@2.2.0: {} diff --git a/tests/integration/alias/__snapshots__/index.test.ts.snap b/tests/integration/alias/__snapshots__/index.test.ts.snap index ee0ddabf5..3ff127d40 100644 --- a/tests/integration/alias/__snapshots__/index.test.ts.snap +++ b/tests/integration/alias/__snapshots__/index.test.ts.snap @@ -20,8 +20,8 @@ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_targe `; exports[`source.alias 3`] = ` -"import * as __WEBPACK_EXTERNAL_MODULE__a_js__ from "./a.js"; -console.info(__WEBPACK_EXTERNAL_MODULE__a_js__.a); +"import * as __WEBPACK_EXTERNAL_MODULE__a_js_256e6de1__ from "./a.js"; +console.info(__WEBPACK_EXTERNAL_MODULE__a_js_256e6de1__.a); " `; diff --git a/tests/integration/alias/index.test.ts b/tests/integration/alias/index.test.ts index 331423b9b..49de522c8 100644 --- a/tests/integration/alias/index.test.ts +++ b/tests/integration/alias/index.test.ts @@ -28,7 +28,7 @@ test('source.alias', async () => { // bundleless mode expect(indexBundlelessEsmContent).toContain( - 'import * as __WEBPACK_EXTERNAL_MODULE__a_js__ from "./a.js";', + 'import * as __WEBPACK_EXTERNAL_MODULE__a_js_256e6de1__ from "./a.js";', ); expect(indexBundlelessCjsContent).toContain( 'const external_a_cjs_namespaceObject = require("./a.cjs");', diff --git a/tests/integration/asset/__snapshots__/index.test.ts.snap b/tests/integration/asset/__snapshots__/index.test.ts.snap index 760555217..50129058c 100644 --- a/tests/integration/asset/__snapshots__/index.test.ts.snap +++ b/tests/integration/asset/__snapshots__/index.test.ts.snap @@ -1,24 +1,24 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`use svgr 1`] = ` -"import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime"; +"import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime"; import "react"; -const SvgLogo = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("svg", { +const SvgLogo = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 841.9 595.3", ...props, - children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)("g", { + children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("g", { fill: "#61DAFB", children: [ - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("path", { + /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { d: "M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3m-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9m-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9m32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1M421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32m-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24q7.05 12 14.4 23.4M420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32m-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9m-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6s22.9-35.6 58.3-50.6c8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2M310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7m237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1m38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6M320.8 78.4" }), - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("circle", { + /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("circle", { cx: 420.9, cy: 296.5, r: 45.7 }), - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("path", { + /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { d: "M520.5 78.1" }) ] @@ -30,24 +30,24 @@ console.log(logoreact); `; exports[`use svgr 2`] = ` -"import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime"; +"import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime"; import "react"; -const SvgLogo = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("svg", { +const SvgLogo = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 841.9 595.3", ...props, - children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)("g", { + children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("g", { fill: "#61DAFB", children: [ - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("path", { + /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { d: "M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3m-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9m-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9m32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1M421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32m-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24q7.05 12 14.4 23.4M420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32m-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9m-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6s22.9-35.6 58.3-50.6c8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2M310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7m237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1m38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6M320.8 78.4" }), - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("circle", { + /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("circle", { cx: 420.9, cy: 296.5, r: 45.7 }), - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("path", { + /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { d: "M520.5 78.1" }) ] @@ -59,24 +59,24 @@ console.log(logoreact); `; exports[`use svgr 3`] = ` -"import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime"; +"import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime"; import "react"; -const SvgLogo = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("svg", { +const SvgLogo = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 841.9 595.3", ...props, - children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)("g", { + children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("g", { fill: "#61DAFB", children: [ - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("path", { + /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { d: "M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3m-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9m-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9m32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1M421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32m-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24q7.05 12 14.4 23.4M420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32m-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9m-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6s22.9-35.6 58.3-50.6c8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2M310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7m237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1m38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6M320.8 78.4" }), - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("circle", { + /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("circle", { cx: 420.9, cy: 296.5, r: 45.7 }), - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("path", { + /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { d: "M520.5 78.1" }) ] @@ -87,24 +87,24 @@ console.log(SvgLogo); `; exports[`use svgr 4`] = ` -"import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime"; +"import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime"; import "react"; -const SvgLogo = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("svg", { +const SvgLogo = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 841.9 595.3", ...props, - children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)("g", { + children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("g", { fill: "#61DAFB", children: [ - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("path", { + /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { d: "M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3m-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9m-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9m32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1M421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32m-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24q7.05 12 14.4 23.4M420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32m-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9m-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6s22.9-35.6 58.3-50.6c8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2M310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7m237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1m38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6M320.8 78.4" }), - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("circle", { + /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("circle", { cx: 420.9, cy: 296.5, r: 45.7 }), - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("path", { + /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { d: "M520.5 78.1" }) ] diff --git a/tests/integration/auto-external/index.test.ts b/tests/integration/auto-external/index.test.ts index 693e05b3c..02dc74da7 100644 --- a/tests/integration/auto-external/index.test.ts +++ b/tests/integration/auto-external/index.test.ts @@ -29,7 +29,7 @@ test('auto external sub path should works', async () => { 'import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react"', ); expect(entries.esm).toContain( - 'import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime"', + 'import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime"', ); expect(entries.cjs).toContain( diff --git a/tests/integration/bundle-false/__snapshots__/index.test.ts.snap b/tests/integration/bundle-false/__snapshots__/index.test.ts.snap index bf32b380f..b9b52178a 100644 --- a/tests/integration/bundle-false/__snapshots__/index.test.ts.snap +++ b/tests/integration/bundle-false/__snapshots__/index.test.ts.snap @@ -1,24 +1,24 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`svgr in bundleless 1`] = ` -"import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime"; +"import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime"; import "react"; -const SvgLogo = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("svg", { +const SvgLogo = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 841.9 595.3", ...props, - children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)("g", { + children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("g", { fill: "#61DAFB", children: [ - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("path", { + /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { d: "M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3m-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9m-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9m32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1M421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32m-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24q7.05 12 14.4 23.4M420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32m-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9m-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6s22.9-35.6 58.3-50.6c8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2M310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7m237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1m38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6M320.8 78.4" }), - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("circle", { + /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("circle", { cx: 420.9, cy: 296.5, r: 45.7 }), - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("path", { + /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { d: "M520.5 78.1" }) ] diff --git a/tests/integration/bundle-false/index.test.ts b/tests/integration/bundle-false/index.test.ts index c216309ce..c3c9b0d9c 100644 --- a/tests/integration/bundle-false/index.test.ts +++ b/tests/integration/bundle-false/index.test.ts @@ -89,10 +89,10 @@ test('auto add js extension for relative import', async () => { // basic esm for (const importer of [ - 'import * as __WEBPACK_EXTERNAL_MODULE__bar_js__ from "./bar.js";', - 'import * as __WEBPACK_EXTERNAL_MODULE__baz_js_js__ from "./baz.js.js";', - 'import * as __WEBPACK_EXTERNAL_MODULE__foo_js__ from "./foo.js";', - 'import * as __WEBPACK_EXTERNAL_MODULE__qux_js__ from "./qux.js";', + 'import * as __WEBPACK_EXTERNAL_MODULE__bar_js_69b41beb__ from "./bar.js";', + 'import * as __WEBPACK_EXTERNAL_MODULE__baz_js_js_7d4e15b7__ from "./baz.js.js";', + 'import * as __WEBPACK_EXTERNAL_MODULE__foo_js_fdf5aa2d__ from "./foo.js";', + 'import * as __WEBPACK_EXTERNAL_MODULE__qux_js_3d9e4fc9__ from "./qux.js";', ]) { expect(Object.values(contents.esm0!)[3]).toContain(importer); } @@ -109,10 +109,10 @@ test('auto add js extension for relative import', async () => { // using `autoExtension: false` along with `output.filename.js` - esm for (const importer of [ - 'import * as __WEBPACK_EXTERNAL_MODULE__bar_mjs__ from "./bar.mjs";', - 'import * as __WEBPACK_EXTERNAL_MODULE__baz_js_mjs__ from "./baz.js.mjs";', - 'import * as __WEBPACK_EXTERNAL_MODULE__foo_mjs__ from "./foo.mjs";', - 'import * as __WEBPACK_EXTERNAL_MODULE__qux_mjs__ from "./qux.mjs";', + 'import * as __WEBPACK_EXTERNAL_MODULE__bar_mjs_89c909f2__ from "./bar.mjs";', + 'import * as __WEBPACK_EXTERNAL_MODULE__baz_js_mjs_09565ba6__ from "./baz.js.mjs";', + 'import * as __WEBPACK_EXTERNAL_MODULE__foo_mjs_ccdcdd01__ from "./foo.mjs";', + 'import * as __WEBPACK_EXTERNAL_MODULE__qux_mjs_83952e37__ from "./qux.mjs";', ]) { expect(Object.values(contents.esm1!)[3]).toContain(importer); } diff --git a/tests/integration/external-helpers/__snapshots__/index.test.ts.snap b/tests/integration/external-helpers/__snapshots__/index.test.ts.snap index 571cc3e4c..0ddb86c55 100644 --- a/tests/integration/external-helpers/__snapshots__/index.test.ts.snap +++ b/tests/integration/external-helpers/__snapshots__/index.test.ts.snap @@ -1,14 +1,14 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`should external @swc/helpers when externalHelpers is true 1`] = ` -"import * as __WEBPACK_EXTERNAL_MODULE__swc_helpers_class_call_check__ from "@swc/helpers/_/_class_call_check"; -import * as __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class__ from "@swc/helpers/_/_create_class"; +"import * as __WEBPACK_EXTERNAL_MODULE__swc_helpers_class_call_check_f500f6c3__ from "@swc/helpers/_/_class_call_check"; +import * as __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class_63e94838__ from "@swc/helpers/_/_create_class"; var src_rslib_entry_FOO = /*#__PURE__*/ function() { "use strict"; function FOO() { - (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_class_call_check__._)(this, FOO); + (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_class_call_check_f500f6c3__._)(this, FOO); } - (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class__._)(FOO, [ + (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class_63e94838__._)(FOO, [ { key: "bar", get: function() {} @@ -21,14 +21,14 @@ export { src_rslib_entry_FOO as default }; `; exports[`should external @swc/helpers when externalHelpers is true 2`] = ` -"import * as __WEBPACK_EXTERNAL_MODULE__swc_helpers_class_call_check__ from "@swc/helpers/_/_class_call_check"; -import * as __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class__ from "@swc/helpers/_/_create_class"; +"import * as __WEBPACK_EXTERNAL_MODULE__swc_helpers_class_call_check_f500f6c3__ from "@swc/helpers/_/_class_call_check"; +import * as __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class_63e94838__ from "@swc/helpers/_/_create_class"; var src_rslib_entry_FOO = /*#__PURE__*/ function() { "use strict"; function FOO() { - (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_class_call_check__._)(this, FOO); + (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_class_call_check_f500f6c3__._)(this, FOO); } - (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class__._)(FOO, [ + (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class_63e94838__._)(FOO, [ { key: "bar", get: function() {} @@ -111,14 +111,14 @@ export { src_rslib_entry_FOO as default }; `; exports[`should respect user override externalHelpers config 2`] = ` -"import * as __WEBPACK_EXTERNAL_MODULE__swc_helpers_class_call_check__ from "@swc/helpers/_/_class_call_check"; -import * as __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class__ from "@swc/helpers/_/_create_class"; +"import * as __WEBPACK_EXTERNAL_MODULE__swc_helpers_class_call_check_f500f6c3__ from "@swc/helpers/_/_class_call_check"; +import * as __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class_63e94838__ from "@swc/helpers/_/_create_class"; var src_rslib_entry_FOO = /*#__PURE__*/ function() { "use strict"; function FOO() { - (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_class_call_check__._)(this, FOO); + (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_class_call_check_f500f6c3__._)(this, FOO); } - (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class__._)(FOO, [ + (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class_63e94838__._)(FOO, [ { key: "bar", get: function() {} diff --git a/tests/integration/externals/index.test.ts b/tests/integration/externals/index.test.ts index 129942075..ca93be81c 100644 --- a/tests/integration/externals/index.test.ts +++ b/tests/integration/externals/index.test.ts @@ -16,7 +16,7 @@ test('auto externalize Node.js built-in modules when `output.target` is "node"', for (const external of [ 'import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs"', - 'import * as __WEBPACK_EXTERNAL_MODULE_node_assert__ from "node:assert"', + 'import * as __WEBPACK_EXTERNAL_MODULE_node_assert_3e74d44e__ from "node:assert"', 'import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react"', 'import * as __WEBPACK_EXTERNAL_MODULE_bar__ from "bar"', 'module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("foo");', diff --git a/tests/integration/format/index.test.ts b/tests/integration/format/index.test.ts index 9e32f5529..76d07b2b4 100644 --- a/tests/integration/format/index.test.ts +++ b/tests/integration/format/index.test.ts @@ -14,8 +14,8 @@ test('esm', async () => { } `); expect(entries.esm).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE_node_url__ from "node:url"; - const packageDirectory = __WEBPACK_EXTERNAL_MODULE_node_url__["default"].fileURLToPath(new URL('.', import.meta.url)); + "import * as __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__ from "node:url"; + const packageDirectory = __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__["default"].fileURLToPath(new URL('.', import.meta.url)); const foo = 'foo'; export { foo, packageDirectory }; " diff --git a/tests/integration/minify/index.test.ts b/tests/integration/minify/index.test.ts index 320b58821..c42de002a 100644 --- a/tests/integration/minify/index.test.ts +++ b/tests/integration/minify/index.test.ts @@ -7,36 +7,36 @@ describe('minify config', () => { const fixturePath = join(__dirname, 'default'); const { entries } = await buildAndGetResults({ fixturePath }); expect(entries.esm).toMatchInlineSnapshot(` - "/*! For license information please see index.js.LICENSE.txt */ - import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime"; - /*! Legal Comment */ const foo = ()=>{}; - const Button = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)('button', {}); - export { Button, foo }; - " - `); + "/*! For license information please see index.js.LICENSE.txt */ + import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime"; + /*! Legal Comment */ const foo = ()=>{}; + const Button = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)('button', {}); + export { Button, foo }; + " + `); }); test('minify is disabled, nothing will be stripped', async () => { const fixturePath = join(__dirname, 'config/disabled'); const { entries } = await buildAndGetResults({ fixturePath }); expect(entries.esm).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime"; + "import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime"; - ;// CONCATENATED MODULE: external "react/jsx-runtime" + ;// CONCATENATED MODULE: external "react/jsx-runtime" - ;// CONCATENATED MODULE: ../../__fixtures__/src/index.ts?__rslib_entry__ - /*! Legal Comment */ - const foo = ()=>{}; - const bar = ()=>{}; - const baz = ()=>{ - return bar(); - }; - // normal comment - const Button = ()=>/*#__PURE__*/ (0,__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)('button', {}); + ;// CONCATENATED MODULE: ../../__fixtures__/src/index.ts?__rslib_entry__ + /*! Legal Comment */ + const foo = ()=>{}; + const bar = ()=>{}; + const baz = ()=>{ + return bar(); + }; + // normal comment + const Button = ()=>/*#__PURE__*/ (0,__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)('button', {}); - export { Button, foo }; - " - `); + export { Button, foo }; + " + `); }); test('minify is enabled, only preserve some comments and annotations', async () => { diff --git a/tests/integration/redirect/js.test.ts b/tests/integration/redirect/js.test.ts index 18cc4cdcb..115adfe0e 100644 --- a/tests/integration/redirect/js.test.ts +++ b/tests/integration/redirect/js.test.ts @@ -22,11 +22,11 @@ test('redirect.js default', async () => { expect(indexContent).toMatchInlineSnapshot(` "import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash"; import * as __WEBPACK_EXTERNAL_MODULE_prettier__ from "prettier"; - import * as __WEBPACK_EXTERNAL_MODULE__bar_index_js__ from "./bar/index.js"; - import * as __WEBPACK_EXTERNAL_MODULE__foo_js__ from "./foo.js"; - import * as __WEBPACK_EXTERNAL_MODULE__baz_js__ from "./baz.js"; + import * as __WEBPACK_EXTERNAL_MODULE__bar_index_js_89500c0c__ from "./bar/index.js"; + import * as __WEBPACK_EXTERNAL_MODULE__foo_js_fdf5aa2d__ from "./foo.js"; + import * as __WEBPACK_EXTERNAL_MODULE__baz_js_a2c1c788__ from "./baz.js"; console.log('prettier: ', __WEBPACK_EXTERNAL_MODULE_prettier__["default"]); - const src_rslib_entry_ = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo_js__.foo + __WEBPACK_EXTERNAL_MODULE__bar_index_js__.bar + __WEBPACK_EXTERNAL_MODULE__foo_js__.foo + __WEBPACK_EXTERNAL_MODULE__bar_index_js__.bar + __WEBPACK_EXTERNAL_MODULE__baz_js__.baz); + const src_rslib_entry_ = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo_js_fdf5aa2d__.foo + __WEBPACK_EXTERNAL_MODULE__bar_index_js_89500c0c__.bar + __WEBPACK_EXTERNAL_MODULE__foo_js_fdf5aa2d__.foo + __WEBPACK_EXTERNAL_MODULE__bar_index_js_89500c0c__.bar + __WEBPACK_EXTERNAL_MODULE__baz_js_a2c1c788__.baz); export { src_rslib_entry_ as default }; " `); @@ -47,13 +47,13 @@ test('redirect.js.path false', async () => { expect(indexContent).toMatchInlineSnapshot(` "import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash"; import * as __WEBPACK_EXTERNAL_MODULE_prettier__ from "prettier"; - import * as __WEBPACK_EXTERNAL_MODULE__bar__ from "@/bar"; - import * as __WEBPACK_EXTERNAL_MODULE__foo__ from "@/foo"; - import * as __WEBPACK_EXTERNAL_MODULE__baz__ from "~/baz"; - import * as __WEBPACK_EXTERNAL_MODULE__bar_js__ from "./bar.js"; - import * as __WEBPACK_EXTERNAL_MODULE__foo_js__ from "./foo.js"; + import * as __WEBPACK_EXTERNAL_MODULE__bar_943a8c75__ from "@/bar"; + import * as __WEBPACK_EXTERNAL_MODULE__foo_a5f33889__ from "@/foo"; + import * as __WEBPACK_EXTERNAL_MODULE__baz_3ce4598c__ from "~/baz"; + import * as __WEBPACK_EXTERNAL_MODULE__bar_js_69b41beb__ from "./bar.js"; + import * as __WEBPACK_EXTERNAL_MODULE__foo_js_fdf5aa2d__ from "./foo.js"; console.log('prettier: ', __WEBPACK_EXTERNAL_MODULE_prettier__["default"]); - const src_rslib_entry_ = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo_js__.foo + __WEBPACK_EXTERNAL_MODULE__bar_js__.bar + __WEBPACK_EXTERNAL_MODULE__foo__.foo + __WEBPACK_EXTERNAL_MODULE__bar__.bar + __WEBPACK_EXTERNAL_MODULE__baz__.baz); + const src_rslib_entry_ = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo_js_fdf5aa2d__.foo + __WEBPACK_EXTERNAL_MODULE__bar_js_69b41beb__.bar + __WEBPACK_EXTERNAL_MODULE__foo_a5f33889__.foo + __WEBPACK_EXTERNAL_MODULE__bar_943a8c75__.bar + __WEBPACK_EXTERNAL_MODULE__baz_3ce4598c__.baz); export { src_rslib_entry_ as default }; " `); @@ -72,13 +72,13 @@ test('redirect.js.path with user override externals', async () => { expect(indexContent).toMatchInlineSnapshot(` "import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash"; import * as __WEBPACK_EXTERNAL_MODULE_prettier__ from "prettier"; - import * as __WEBPACK_EXTERNAL_MODULE__others_bar_index_js__ from "./others/bar/index.js"; - import * as __WEBPACK_EXTERNAL_MODULE__others_foo_js__ from "./others/foo.js"; - import * as __WEBPACK_EXTERNAL_MODULE__baz_js__ from "./baz.js"; - import * as __WEBPACK_EXTERNAL_MODULE__bar_index_js__ from "./bar/index.js"; - import * as __WEBPACK_EXTERNAL_MODULE__foo_js__ from "./foo.js"; + import * as __WEBPACK_EXTERNAL_MODULE__others_bar_index_js_6776b573__ from "./others/bar/index.js"; + import * as __WEBPACK_EXTERNAL_MODULE__others_foo_js_920f94ba__ from "./others/foo.js"; + import * as __WEBPACK_EXTERNAL_MODULE__baz_js_a2c1c788__ from "./baz.js"; + import * as __WEBPACK_EXTERNAL_MODULE__bar_index_js_89500c0c__ from "./bar/index.js"; + import * as __WEBPACK_EXTERNAL_MODULE__foo_js_fdf5aa2d__ from "./foo.js"; console.log('prettier: ', __WEBPACK_EXTERNAL_MODULE_prettier__["default"]); - const src_rslib_entry_ = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo_js__.foo + __WEBPACK_EXTERNAL_MODULE__bar_index_js__.bar + __WEBPACK_EXTERNAL_MODULE__others_foo_js__.foo + __WEBPACK_EXTERNAL_MODULE__others_bar_index_js__.bar + __WEBPACK_EXTERNAL_MODULE__baz_js__.baz); + const src_rslib_entry_ = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo_js_fdf5aa2d__.foo + __WEBPACK_EXTERNAL_MODULE__bar_index_js_89500c0c__.bar + __WEBPACK_EXTERNAL_MODULE__others_foo_js_920f94ba__.foo + __WEBPACK_EXTERNAL_MODULE__others_bar_index_js_6776b573__.bar + __WEBPACK_EXTERNAL_MODULE__baz_js_a2c1c788__.baz); export { src_rslib_entry_ as default }; " `); @@ -105,13 +105,13 @@ test('redirect.js.path with user override alias', async () => { expect(indexContent).toMatchInlineSnapshot(` "import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash"; import * as __WEBPACK_EXTERNAL_MODULE_prettier__ from "prettier"; - import * as __WEBPACK_EXTERNAL_MODULE__others_bar_index_js__ from "./others/bar/index.js"; - import * as __WEBPACK_EXTERNAL_MODULE__others_foo_js__ from "./others/foo.js"; - import * as __WEBPACK_EXTERNAL_MODULE__baz_js__ from "./baz.js"; - import * as __WEBPACK_EXTERNAL_MODULE__bar_index_js__ from "./bar/index.js"; - import * as __WEBPACK_EXTERNAL_MODULE__foo_js__ from "./foo.js"; + import * as __WEBPACK_EXTERNAL_MODULE__others_bar_index_js_6776b573__ from "./others/bar/index.js"; + import * as __WEBPACK_EXTERNAL_MODULE__others_foo_js_920f94ba__ from "./others/foo.js"; + import * as __WEBPACK_EXTERNAL_MODULE__baz_js_a2c1c788__ from "./baz.js"; + import * as __WEBPACK_EXTERNAL_MODULE__bar_index_js_89500c0c__ from "./bar/index.js"; + import * as __WEBPACK_EXTERNAL_MODULE__foo_js_fdf5aa2d__ from "./foo.js"; console.log('prettier: ', __WEBPACK_EXTERNAL_MODULE_prettier__["default"]); - const src_rslib_entry_ = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo_js__.foo + __WEBPACK_EXTERNAL_MODULE__bar_index_js__.bar + __WEBPACK_EXTERNAL_MODULE__others_foo_js__.foo + __WEBPACK_EXTERNAL_MODULE__others_bar_index_js__.bar + __WEBPACK_EXTERNAL_MODULE__baz_js__.baz); + const src_rslib_entry_ = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo_js_fdf5aa2d__.foo + __WEBPACK_EXTERNAL_MODULE__bar_index_js_89500c0c__.bar + __WEBPACK_EXTERNAL_MODULE__others_foo_js_920f94ba__.foo + __WEBPACK_EXTERNAL_MODULE__others_bar_index_js_6776b573__.bar + __WEBPACK_EXTERNAL_MODULE__baz_js_a2c1c788__.baz); export { src_rslib_entry_ as default }; " `); @@ -133,11 +133,11 @@ test('redirect.js.extension: false', async () => { expect(indexContent).toMatchInlineSnapshot(` "import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash"; import * as __WEBPACK_EXTERNAL_MODULE_prettier__ from "prettier"; - import * as __WEBPACK_EXTERNAL_MODULE__bar_index_ts__ from "./bar/index.ts"; - import * as __WEBPACK_EXTERNAL_MODULE__foo_ts__ from "./foo.ts"; - import * as __WEBPACK_EXTERNAL_MODULE__baz_ts__ from "./baz.ts"; + import * as __WEBPACK_EXTERNAL_MODULE__bar_index_ts_bd8d18e6__ from "./bar/index.ts"; + import * as __WEBPACK_EXTERNAL_MODULE__foo_ts_a526d0a1__ from "./foo.ts"; + import * as __WEBPACK_EXTERNAL_MODULE__baz_ts_10ee073f__ from "./baz.ts"; console.log('prettier: ', __WEBPACK_EXTERNAL_MODULE_prettier__["default"]); - const src_rslib_entry_ = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo_ts__.foo + __WEBPACK_EXTERNAL_MODULE__bar_index_ts__.bar + __WEBPACK_EXTERNAL_MODULE__foo_ts__.foo + __WEBPACK_EXTERNAL_MODULE__bar_index_ts__.bar + __WEBPACK_EXTERNAL_MODULE__baz_ts__.baz); + const src_rslib_entry_ = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo_ts_a526d0a1__.foo + __WEBPACK_EXTERNAL_MODULE__bar_index_ts_bd8d18e6__.bar + __WEBPACK_EXTERNAL_MODULE__foo_ts_a526d0a1__.foo + __WEBPACK_EXTERNAL_MODULE__bar_index_ts_bd8d18e6__.bar + __WEBPACK_EXTERNAL_MODULE__baz_ts_10ee073f__.baz); export { src_rslib_entry_ as default }; " `); diff --git a/tests/integration/redirect/jsNotResolved.test.ts b/tests/integration/redirect/jsNotResolved.test.ts index aa4232037..b2cc15ce0 100644 --- a/tests/integration/redirect/jsNotResolved.test.ts +++ b/tests/integration/redirect/jsNotResolved.test.ts @@ -15,10 +15,10 @@ test('redirect.js default', async () => { expect(indexContent).toMatchInlineSnapshot(` "import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash"; import * as __WEBPACK_EXTERNAL_MODULE_prettier__ from "prettier"; - import * as __WEBPACK_EXTERNAL_MODULE__bar_js__ from "./bar.js"; - import * as __WEBPACK_EXTERNAL_MODULE__foo_js__ from "./foo.js"; + import * as __WEBPACK_EXTERNAL_MODULE__bar_js_69b41beb__ from "./bar.js"; + import * as __WEBPACK_EXTERNAL_MODULE__foo_js_fdf5aa2d__ from "./foo.js"; console.log('prettier: ', __WEBPACK_EXTERNAL_MODULE_prettier__["default"]); - const src_rslib_entry_ = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo_js__["default"] + __WEBPACK_EXTERNAL_MODULE__bar_js__["default"]); + const src_rslib_entry_ = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo_js_fdf5aa2d__["default"] + __WEBPACK_EXTERNAL_MODULE__bar_js_69b41beb__["default"]); export { src_rslib_entry_ as default }; " `); @@ -37,10 +37,10 @@ test('redirect.js.path false', async () => { expect(indexContent).toMatchInlineSnapshot(` "import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash"; import * as __WEBPACK_EXTERNAL_MODULE_prettier__ from "prettier"; - import * as __WEBPACK_EXTERNAL_MODULE__bar_js__ from "./bar.js"; - import * as __WEBPACK_EXTERNAL_MODULE__foo_js__ from "./foo.js"; + import * as __WEBPACK_EXTERNAL_MODULE__bar_js_69b41beb__ from "./bar.js"; + import * as __WEBPACK_EXTERNAL_MODULE__foo_js_fdf5aa2d__ from "./foo.js"; console.log('prettier: ', __WEBPACK_EXTERNAL_MODULE_prettier__["default"]); - const src_rslib_entry_ = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo_js__["default"] + __WEBPACK_EXTERNAL_MODULE__bar_js__["default"]); + const src_rslib_entry_ = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo_js_fdf5aa2d__["default"] + __WEBPACK_EXTERNAL_MODULE__bar_js_69b41beb__["default"]); export { src_rslib_entry_ as default }; " `); @@ -59,10 +59,10 @@ test('redirect.js.extension: false', async () => { expect(indexContent).toMatchInlineSnapshot(` "import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash"; import * as __WEBPACK_EXTERNAL_MODULE_prettier__ from "prettier"; - import * as __WEBPACK_EXTERNAL_MODULE__bar_js__ from "./bar.js"; - import * as __WEBPACK_EXTERNAL_MODULE__foo__ from "./foo"; + import * as __WEBPACK_EXTERNAL_MODULE__bar_js_69b41beb__ from "./bar.js"; + import * as __WEBPACK_EXTERNAL_MODULE__foo_23da6eef__ from "./foo"; console.log('prettier: ', __WEBPACK_EXTERNAL_MODULE_prettier__["default"]); - const src_rslib_entry_ = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo__["default"] + __WEBPACK_EXTERNAL_MODULE__bar_js__["default"]); + const src_rslib_entry_ = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo_23da6eef__["default"] + __WEBPACK_EXTERNAL_MODULE__bar_js_69b41beb__["default"]); export { src_rslib_entry_ as default }; " `); diff --git a/tests/integration/redirect/style.test.ts b/tests/integration/redirect/style.test.ts index 5f783ee28..a3ff10a72 100644 --- a/tests/integration/redirect/style.test.ts +++ b/tests/integration/redirect/style.test.ts @@ -33,8 +33,8 @@ test('0. default', async () => { /cjs\/module\/index\.cjs/, ); expect(cssModuleIndexJs).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE__index_module_js__ from "./index.module.js"; - __WEBPACK_EXTERNAL_MODULE__index_module_js__["default"]; + "import * as __WEBPACK_EXTERNAL_MODULE__index_module_js_6796f91d__ from "./index.module.js"; + __WEBPACK_EXTERNAL_MODULE__index_module_js_6796f91d__["default"]; " `); expect(cssModuleIndexCjs).toContain( @@ -66,8 +66,8 @@ test('1. style.path: false', () => { /cjs\/module\/index\.cjs/, ); expect(cssModuleIndexJs).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE__module_index_module_js__ from "@/module/index.module.js"; - __WEBPACK_EXTERNAL_MODULE__module_index_module_js__["default"]; + "import * as __WEBPACK_EXTERNAL_MODULE__module_index_module_js_37f93df7__ from "@/module/index.module.js"; + __WEBPACK_EXTERNAL_MODULE__module_index_module_js_37f93df7__["default"]; " `); expect(cssModuleIndexCjs).toContain( @@ -99,8 +99,8 @@ test('2. style.extension: false', async () => { /cjs\/module\/index\.cjs/, ); expect(cssModuleIndexJs).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE__index_module_less__ from "./index.module.less"; - __WEBPACK_EXTERNAL_MODULE__index_module_less__["default"]; + "import * as __WEBPACK_EXTERNAL_MODULE__index_module_less_d1c6f702__ from "./index.module.less"; + __WEBPACK_EXTERNAL_MODULE__index_module_less_d1c6f702__["default"]; " `); expect(cssModuleIndexCjs).toContain( @@ -132,8 +132,8 @@ test('3. style.path: false, style.extension: false', async () => { /cjs\/module\/index\.cjs/, ); expect(cssModuleIndexJs).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE__module_index_module_less__ from "@/module/index.module.less"; - __WEBPACK_EXTERNAL_MODULE__module_index_module_less__["default"]; + "import * as __WEBPACK_EXTERNAL_MODULE__module_index_module_less_80aa7a8a__ from "@/module/index.module.less"; + __WEBPACK_EXTERNAL_MODULE__module_index_module_less_80aa7a8a__["default"]; " `); expect(cssModuleIndexCjs).toContain( diff --git a/tests/integration/require/index.test.ts b/tests/integration/require/index.test.ts index c7c580142..a74030375 100644 --- a/tests/integration/require/index.test.ts +++ b/tests/integration/require/index.test.ts @@ -18,8 +18,8 @@ test('require.resolve', async () => { ]; const esmStatements = [ - 'import * as __WEBPACK_EXTERNAL_MODULE_node_module__ from "node:module"', - 'const _require = (0, __WEBPACK_EXTERNAL_MODULE_node_module__.createRequire)(import.meta.url)', + 'import * as __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__ from "node:module"', + 'const _require = (0, __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__.createRequire)(import.meta.url)', ]; const cjsStatements = [ @@ -47,8 +47,8 @@ test('require dynamic', async () => { ]; const esmStatements = [ - 'import * as __WEBPACK_EXTERNAL_MODULE_node_module__ from "node:module"', - 'const _require = (0, __WEBPACK_EXTERNAL_MODULE_node_module__.createRequire)(import.meta.url)', + 'import * as __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__ from "node:module"', + 'const _require = (0, __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__.createRequire)(import.meta.url)', ]; const cjsStatements = [ diff --git a/tests/integration/resolve/index.test.ts b/tests/integration/resolve/index.test.ts index 56912d885..7a47576db 100644 --- a/tests/integration/resolve/index.test.ts +++ b/tests/integration/resolve/index.test.ts @@ -30,8 +30,8 @@ test('resolve node protocol', async () => { expect(isSuccess).toBeTruthy(); expect(entries.esm).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE_node_path__ from "node:path"; - const { join } = __WEBPACK_EXTERNAL_MODULE_node_path__["default"]; + "import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path"; + const { join } = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"]; export { join }; " `); diff --git a/tests/integration/shims/index.test.ts b/tests/integration/shims/index.test.ts index 67a62d627..e6843ea5a 100644 --- a/tests/integration/shims/index.test.ts +++ b/tests/integration/shims/index.test.ts @@ -106,10 +106,10 @@ describe('CJS shims', () => { const fixturePath = join(__dirname, 'cjs'); const { entries } = await buildAndGetResults({ fixturePath }); expect(entries.esm).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE_node_module__ from "node:module"; + "import * as __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__ from "node:module"; import * as __WEBPACK_EXTERNAL_MODULE_url__ from "url"; const importMetaUrl = import.meta.url; - const src_rslib_entry_require = (0, __WEBPACK_EXTERNAL_MODULE_node_module__.createRequire)(import.meta.url); + const src_rslib_entry_require = (0, __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__.createRequire)(import.meta.url); const requiredModule = src_rslib_entry_require('./ok.cjs'); const src_rslib_entry_filename = (0, __WEBPACK_EXTERNAL_MODULE_url__.fileURLToPath)(import.meta.url); console.log(src_rslib_entry_filename); diff --git a/tests/integration/transform-import/index.test.ts b/tests/integration/transform-import/index.test.ts index 349c41a29..790b70b1e 100644 --- a/tests/integration/transform-import/index.test.ts +++ b/tests/integration/transform-import/index.test.ts @@ -10,7 +10,7 @@ test('transformImport with arco-design', async () => { for (const format of formats) { expect(Object.values(contents[format]!)[0]).toContain( format.startsWith('esm') - ? 'import * as __WEBPACK_EXTERNAL_MODULE__arco_design_web_react_es_button__ from "@arco-design/web-react/es/button"' + ? 'import * as __WEBPACK_EXTERNAL_MODULE__arco_design_web_react_es_button_8d812d96__ from "@arco-design/web-react/es/button"' : 'const button_namespaceObject = require("@arco-design/web-react/es/button")', ); expect(Object.values(contents[format]!)[0]).toContain( @@ -29,12 +29,12 @@ test('transformImport with lodash', async () => { for (const format of formats) { expect(Object.values(contents[format]!)[0]).toContain( format.startsWith('esm') - ? 'import * as __WEBPACK_EXTERNAL_MODULE_lodash_get__ from "lodash/get"' + ? 'import * as __WEBPACK_EXTERNAL_MODULE_lodash_get_5fc72f99__ from "lodash/get"' : 'const get_namespaceObject = require("lodash/get")', ); expect(Object.values(contents[format]!)[0]).toContain( format.startsWith('esm') - ? 'import * as __WEBPACK_EXTERNAL_MODULE_lodash_fp_add__ from "lodash/fp/add"' + ? 'import * as __WEBPACK_EXTERNAL_MODULE_lodash_fp_add_73c13873__ from "lodash/fp/add"' : 'const add_namespaceObject = require("lodash/fp/add")', ); } diff --git a/tests/package.json b/tests/package.json index e2d61056a..f89ebdb47 100644 --- a/tests/package.json +++ b/tests/package.json @@ -14,7 +14,7 @@ "@codspeed/vitest-plugin": "^4.0.0", "@module-federation/rsbuild-plugin": "^0.8.7", "@playwright/test": "1.49.1", - "@rsbuild/core": "~1.1.13", + "@rsbuild/core": "1.2.0-alpha.0", "@rsbuild/plugin-less": "^1.1.0", "@rsbuild/plugin-react": "^1.1.0", "@rsbuild/plugin-sass": "^1.1.2", diff --git a/website/package.json b/website/package.json index bb09833a7..885cabd4a 100644 --- a/website/package.json +++ b/website/package.json @@ -9,7 +9,7 @@ "preview": "rspress preview" }, "devDependencies": { - "@rsbuild/core": "~1.1.13", + "@rsbuild/core": "1.2.0-alpha.0", "@rslib/tsconfig": "workspace:*", "@rstack-dev/doc-ui": "1.5.4", "@types/node": "^22.8.1",