diff --git a/package.json b/package.json index 5aabf7264..56c461dc6 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "simple-git-hooks" ], "overrides": { + "@rspack/core": "npm:@rspack-canary/core@1.3.6-canary-ece12b8c-20250422072221", "zx>@types/node": "-" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 823d2206f..0c6f8786f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,6 +5,7 @@ settings: excludeLinksFromLockfile: false overrides: + '@rspack/core': npm:@rspack-canary/core@1.3.6-canary-ece12b8c-20250422072221 zx>@types/node: '-' importers: @@ -91,7 +92,7 @@ importers: devDependencies: '@module-federation/rsbuild-plugin': specifier: ^0.12.0 - version: 0.12.0(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0) + version: 0.12.0(@rsbuild/core@1.3.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0) '@rsbuild/core': specifier: 1.3.9 version: 1.3.9 @@ -112,13 +113,13 @@ importers: devDependencies: '@module-federation/enhanced': specifier: ^0.12.0 - version: 0.12.0(@rspack/core@1.3.5(@swc/helpers@0.5.17))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0) + version: 0.12.0(@swc/helpers@0.5.17)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0) '@module-federation/rsbuild-plugin': specifier: ^0.12.0 - version: 0.12.0(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0) + version: 0.12.0(@rsbuild/core@1.3.9)(@swc/helpers@0.5.17)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0) '@module-federation/storybook-addon': specifier: ^4.0.13 - version: 4.0.13(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(@storybook/core@8.6.12(prettier@3.5.3)(storybook@8.6.12(prettier@3.5.3)))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack-virtual-modules@0.6.2)(webpack@5.98.0) + version: 4.0.13(@rsbuild/core@1.3.9)(@storybook/core@8.6.12(prettier@3.5.3)(storybook@8.6.12(prettier@3.5.3)))(@swc/helpers@0.5.17)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack-virtual-modules@0.6.2)(webpack@5.98.0) '@rsbuild/plugin-react': specifier: ^1.2.0 version: 1.2.0(@rsbuild/core@1.3.9) @@ -142,10 +143,10 @@ importers: version: 8.6.12(prettier@3.5.3) storybook-addon-rslib: specifier: ^1.0.1 - version: 1.0.1(@rsbuild/core@1.3.9)(@rslib/core@packages+core)(storybook-builder-rsbuild@1.0.1(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(@types/react@19.1.2)(storybook@8.6.12(prettier@3.5.3))(typescript@5.8.3)(webpack-sources@3.2.3))(typescript@5.8.3) + version: 1.0.1(@rsbuild/core@1.3.9)(@rslib/core@packages+core)(storybook-builder-rsbuild@1.0.1(@rsbuild/core@1.3.9)(@swc/helpers@0.5.17)(@types/react@19.1.2)(storybook@8.6.12(prettier@3.5.3))(typescript@5.8.3)(webpack-sources@3.2.3))(typescript@5.8.3) storybook-react-rsbuild: specifier: ^1.0.1 - version: 1.0.1(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(@types/react@19.1.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(rollup@4.39.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.8.3)(webpack-sources@3.2.3)(webpack@5.98.0) + version: 1.0.1(@rsbuild/core@1.3.9)(@swc/helpers@0.5.17)(@types/react@19.1.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(rollup@4.39.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.8.3)(webpack-sources@3.2.3)(webpack@5.98.0) examples/module-federation/mf-remote: dependencies: @@ -158,7 +159,7 @@ importers: devDependencies: '@module-federation/rsbuild-plugin': specifier: ^0.12.0 - version: 0.12.0(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0) + version: 0.12.0(@rsbuild/core@1.3.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0) '@rsbuild/core': specifier: 1.3.9 version: 1.3.9 @@ -276,7 +277,7 @@ importers: devDependencies: '@module-federation/rsbuild-plugin': specifier: ^0.12.0 - version: 0.12.0(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0) + version: 0.12.0(@rsbuild/core@1.3.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0) '@rslib/tsconfig': specifier: workspace:* version: link:../../scripts/tsconfig @@ -401,7 +402,7 @@ importers: version: 4.0.1(vite@6.0.11(@types/node@22.8.1)(jiti@2.4.2)(sass-embedded@1.86.0)(stylus@0.64.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.6.1))(vitest@3.1.1(@types/debug@4.1.12)(@types/node@22.8.1)(jiti@2.4.2)(sass-embedded@1.86.0)(stylus@0.64.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.6.1)) '@module-federation/rsbuild-plugin': specifier: ^0.12.0 - version: 0.12.0(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0) + version: 0.12.0(@rsbuild/core@1.3.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0) '@playwright/test': specifier: 1.52.0 version: 1.52.0 @@ -933,13 +934,13 @@ importers: devDependencies: '@rsbuild/plugin-stylus': specifier: ^1.1.1 - version: 1.1.1(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(webpack@5.98.0) + version: 1.1.1(@rsbuild/core@1.3.9)(@swc/helpers@0.5.17)(webpack@5.98.0) tests/integration/style/stylus/bundle-false: devDependencies: '@rsbuild/plugin-stylus': specifier: ^1.1.1 - version: 1.1.1(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(webpack@5.98.0) + version: 1.1.1(@rsbuild/core@1.3.9)(@swc/helpers@0.5.17)(webpack@5.98.0) tests/integration/style/tailwindcss/bundle: devDependencies: @@ -1958,9 +1959,6 @@ packages: webpack: optional: true - '@module-federation/error-codes@0.11.2': - resolution: {integrity: sha512-ik1Qnn0I+WyEdprTck9WGlH41vGsVdUg8cfO+ZM02qOb2cZm5Vu3SlxGAobj6g7uAj0g8yINnd7h7Dci40BxQA==} - '@module-federation/error-codes@0.12.0': resolution: {integrity: sha512-DEXQjopcBuGzp/NA9OVtASO0uZ6grVK5TIe0PjrbDRyZDxVaYQXKrISxBLOE+3nSIELE98tYpfxptm8WC9A8zA==} @@ -1987,7 +1985,6 @@ packages: '@module-federation/rspack@0.12.0': resolution: {integrity: sha512-cfhByyhOYKAGn93CQ+G/1GtNQOZMxBP1mSgweQ/295Chj0NWynkwSyxEzLgjWTsvUdL3UgpgC8Atw3/WAy5KVg==} peerDependencies: - '@rspack/core': '>=0.7' typescript: ^4.9.0 || ^5.0.0 vue-tsc: '>=1.0.24' peerDependenciesMeta: @@ -1996,27 +1993,15 @@ packages: vue-tsc: optional: true - '@module-federation/runtime-core@0.11.2': - resolution: {integrity: sha512-dia5kKybi6MFU0s5PgglJwN27k7n9Sf69Cy5xZ4BWaP0qlaXTsxHKO0PECHNt2Pt8jDdyU29sQ4DwAQfxpnXJQ==} - '@module-federation/runtime-core@0.12.0': resolution: {integrity: sha512-373zBM54196KHURs/O8lry9trCAM3PPidvsF4YdrtahNc8YaQynml0mE3zdZeBnqP6H0/4OpPqMMjACI80Ht8w==} - '@module-federation/runtime-tools@0.11.2': - resolution: {integrity: sha512-4MJTGAxVq6vxQRkTtTlH7Mm9AVqgn0X9kdu+7RsL7T/qU+jeYsbrntN2CWG3GVVA8r5JddXyTI1iJ0VXQZLV1w==} - '@module-federation/runtime-tools@0.12.0': resolution: {integrity: sha512-hZ0R1gtHOgMDzM0QQ8WjRxo2DHzXzlTWOYMBdSivDYRTktpEtM/DXZrmJZuRYh9cvVmbIz5D/v9s6M44eLfHMA==} - '@module-federation/runtime@0.11.2': - resolution: {integrity: sha512-Ya9u/L6z2LvhgpqxuKCB7LcigIIRf1BbaxAZIH7mzbq/A7rZtTP7v+73E433jvgiAlbAfPSZkeoYGele6hfRwA==} - '@module-federation/runtime@0.12.0': resolution: {integrity: sha512-Cz9/7+gSvrdencwA8LXUMKnZdu0/flyN+yk6t3pkxfhvPJi3W65ZcalAKyOgyk2x8rEYrRSyEXu+/2DIFgrzmA==} - '@module-federation/sdk@0.11.2': - resolution: {integrity: sha512-SBFe5xOamluT900J4AGBx+2/kCH/JbfqXoUwPSAC6PRzb8Y7LB0posnOGzmqYsLZXT37vp3d6AmJDsVoajDqxw==} - '@module-federation/sdk@0.12.0': resolution: {integrity: sha512-vh3GcG90fxjbkMghK7iSWcMayi/y8U5DxI6mhEFuz11St3y1UgQO2TZYephL8nISFBld7DdiqAkimx+6Hb3hjQ==} @@ -2050,9 +2035,6 @@ packages: '@module-federation/third-party-dts-extractor@0.12.0': resolution: {integrity: sha512-CsK+O9QebjANqM4EClnYhdtFZhwnIx3jYfpL61OAUJL7aSDjHwguQD9egWqRZovfAFY+DnQpMiRuerwey1Sffg==} - '@module-federation/webpack-bundler-runtime@0.11.2': - resolution: {integrity: sha512-WdwIE6QF+MKs/PdVu0cKPETF743JB9PZ62/qf7Uo3gU4fjsUMc37RnbJZ/qB60EaHHfjwp1v6NnhZw1r4eVsnw==} - '@module-federation/webpack-bundler-runtime@0.12.0': resolution: {integrity: sha512-IUAz0BdCGuaKIPcMTSD/dWxGjS0K4j4bBhAupRnDMMMOvJnZivVwj0KvmTeIUfyG+lEDNWLVP2pDVQEvGcCy4Q==} @@ -2385,123 +2367,60 @@ packages: typescript: optional: true - '@rspack/binding-darwin-arm64@1.3.4': - resolution: {integrity: sha512-cVfzvtVf05VumGrxFz9Tk0QHk4jWBcQBNQuaql2enco8NKnzuX+v0+VP2mbNfvgICBgrHWKRYinAX5IxTEJdCw==} - cpu: [arm64] - os: [darwin] - - '@rspack/binding-darwin-arm64@1.3.5': - resolution: {integrity: sha512-bhqi9nZ0jrlQc/YgTklzD02y0E8Emdrov6HLcxt/Dzwq5SZryl4Ik8yc/8E1M0PWNkr09+TO8i1Zc51z0Gfu2g==} + '@rspack-canary/binding-darwin-arm64@1.3.6-canary-ece12b8c-20250422072221': + resolution: {integrity: sha512-0aEL3m/mX9rLxWV29We1nlGAQ7ssSgY7mp/cW2JP0ZlmAea+qfT8HXRuBEQb3zJXyVIvRgzbuiQ76iiL2NeDjA==} cpu: [arm64] os: [darwin] - '@rspack/binding-darwin-x64@1.3.4': - resolution: {integrity: sha512-vXzf8xI+njdOSXGyI39lqkH/bSwyrx4jXW9+Pj2zbmRJVHZVyJsrx4kSpOoZX5zx/a7BbvuHRwrmmJS2HEOobw==} + '@rspack-canary/binding-darwin-x64@1.3.6-canary-ece12b8c-20250422072221': + resolution: {integrity: sha512-vNDSoT7LBAw2RNoXmLaXSqXa58CYK8fSc4h8KKf9YZ/eeM9Zm/975J1kcYeupz4IrH78yxjxSP7uC2vbCDI/xQ==} cpu: [x64] os: [darwin] - '@rspack/binding-darwin-x64@1.3.5': - resolution: {integrity: sha512-ysNn7bd/5NdVb0mTDBQl+D9GypCSS7FJoJJEeSpPcN01zFF8lRUsvdbOvzrG/CUBA2qbeWhwZvG2eKOy3p2NRA==} - cpu: [x64] - os: [darwin] - - '@rspack/binding-linux-arm64-gnu@1.3.4': - resolution: {integrity: sha512-c45kQrqzR05Jc62oAetiAXrnPWhyt3Pz1h2LF62OW8SYXxdBskAKpWntTts/T96HMLqNPH3MAfDKxyfOb/n0eQ==} - cpu: [arm64] - os: [linux] - - '@rspack/binding-linux-arm64-gnu@1.3.5': - resolution: {integrity: sha512-oEfPjYx3RVsMeHG/kI9k96nLJUQhYfQS9HUKS37Ko3RWC84qTuzMAAdWIXE9ys8GHwpks7pL953AfYNK5PLhPw==} + '@rspack-canary/binding-linux-arm64-gnu@1.3.6-canary-ece12b8c-20250422072221': + resolution: {integrity: sha512-fXlGuKMjLiuaN/Mx4DLD+NAzsmwKTxgfXnbtqGlV7ubcC7+n0AjTCZNxD94pDINrbB+E5MoUH4xa8lVa1cDAxw==} cpu: [arm64] os: [linux] - '@rspack/binding-linux-arm64-musl@1.3.4': - resolution: {integrity: sha512-/dUvkcBVnV95tA7BpeA6IZhrbpwxFzvgU6qF/iKxyHdMjwHdjn1Um7nR00TPOn/SIHzljafHpL6CuVTLNB5xvA==} + '@rspack-canary/binding-linux-arm64-musl@1.3.6-canary-ece12b8c-20250422072221': + resolution: {integrity: sha512-Y2QqvY1ciFONUVatZpPw0gA42IY6HIe7WadFwPlXOR4M7xAHCy3sYQSxSI1og3swTzthDQEUAV86dqmbHkiSRQ==} cpu: [arm64] os: [linux] - '@rspack/binding-linux-arm64-musl@1.3.5': - resolution: {integrity: sha512-4cUoxd8nGsCCnqWBqortJRF+VKWzUm7ac9YRMQ+wpoL5i0abcQf8GqeilsNtRBRNqAlAh3mfgRlyeZgWvoS44g==} - cpu: [arm64] - os: [linux] - - '@rspack/binding-linux-x64-gnu@1.3.4': - resolution: {integrity: sha512-jZgGKoH7RyqJbyEcvhEE9wqK6mwoWxLF3c3LD2+e+dKVcO5iCfMuulCGdzUnYyvH97CtvN5j0/20PErRXubyjg==} - cpu: [x64] - os: [linux] - - '@rspack/binding-linux-x64-gnu@1.3.5': - resolution: {integrity: sha512-JehI/z61Y9wwkcTxbAdPtjUnAyyAUCJZOqP3FwQTAd2gBFG/8k7v1quGwrfOLsCLOcT3azbd8YFoHmkveGQayQ==} + '@rspack-canary/binding-linux-x64-gnu@1.3.6-canary-ece12b8c-20250422072221': + resolution: {integrity: sha512-LDGmp14S5r0U+FWlN99iEmjxYeoMRkzLV2/FqszWqrOul89Sa0mZ+l7RmWyK7gRrV1Ep8KfXgZ0dG68RrKAc6g==} cpu: [x64] os: [linux] - '@rspack/binding-linux-x64-musl@1.3.4': - resolution: {integrity: sha512-Xko8mZ598vQDubig4rLTuCDjXplSDJbJEg6B3NykGaE6CMH2bI/6KJfVKEKo25ayNzoouT/1MxyOxB4mQuspbA==} + '@rspack-canary/binding-linux-x64-musl@1.3.6-canary-ece12b8c-20250422072221': + resolution: {integrity: sha512-3vmV/rCuDz68yEGQbo/rcIqYZIx/aj0gxti29i7upOyHlp/YLBm5nA3G2VENjZdCofxO03Fxav4pUxZ82/wQ8A==} cpu: [x64] os: [linux] - '@rspack/binding-linux-x64-musl@1.3.5': - resolution: {integrity: sha512-t8BqaOXrqIXZHTrz4ItX/m6BOvbBkeb7qTewlkN5mMHtPAF/Xg203rQ814VXx59kjgGF7i79PXIK2dQxHnCYDA==} - cpu: [x64] - os: [linux] - - '@rspack/binding-win32-arm64-msvc@1.3.4': - resolution: {integrity: sha512-Q+pU/MRylYB3XoNTM1LYPxWV1KUxeZY6R54twtoDFXhZn/PDflP7qH1BHQ0KN50HuG5ZK89CaFSPMF7+vs6HNA==} - cpu: [arm64] - os: [win32] - - '@rspack/binding-win32-arm64-msvc@1.3.5': - resolution: {integrity: sha512-k9vf/WgEwxtXzV4la1H6eL07GIlvNjdPdvo1AJZdu0Zcnm600Kv5NSBjySJCp3zUHIKkCE9A0+ibifqbliG0fw==} + '@rspack-canary/binding-win32-arm64-msvc@1.3.6-canary-ece12b8c-20250422072221': + resolution: {integrity: sha512-6wNwX3RT3mfpP3FDXcndcnCZQxL+LAlg7cTr/73WuykNX/mlhvQSanCUnj30kcosPQiMA0ma334L86XGuj4iWA==} cpu: [arm64] os: [win32] - '@rspack/binding-win32-ia32-msvc@1.3.4': - resolution: {integrity: sha512-aqP/l+YAG4L9I1klW3uSq+olafw8xzAP+4cd/Nyy2SSDnhWsDgawxJyO6FIeM+hXwC73ChH9pcXHGgEC7iCcHw==} - cpu: [ia32] - os: [win32] - - '@rspack/binding-win32-ia32-msvc@1.3.5': - resolution: {integrity: sha512-dGfGJySHC/ktbNkK/FY2vEpFNK4UT+fgChhmUxIyQaHWjloFGVmEr6NttS0GtdtvblfF3tTzkTe9pGMIkdlegw==} + '@rspack-canary/binding-win32-ia32-msvc@1.3.6-canary-ece12b8c-20250422072221': + resolution: {integrity: sha512-H1VaH3gvnmhncpn9B4jvUCybsIvHu9fX45plGwb9fM5vD7Kfhg4EfoGORy5sUBeob4N/K5pH3Oqv9eU6Z87KxA==} cpu: [ia32] os: [win32] - '@rspack/binding-win32-x64-msvc@1.3.4': - resolution: {integrity: sha512-xDU1njA1gIzIL6Nt5ARW4vWeVgwf00i7tPONg+6fJyMgwuFfwq2qEG7UFSBOedYjsSTCW+UoBh7riN7lRiFIvw==} - cpu: [x64] - os: [win32] - - '@rspack/binding-win32-x64-msvc@1.3.5': - resolution: {integrity: sha512-GujYFTr043jse5gdvofsRvltkH/E8G5h3Yu9JG/+6EyQpFJebYm/NpRQrOyqZLIQP39+tbdViTfW4nOpUuurNA==} + '@rspack-canary/binding-win32-x64-msvc@1.3.6-canary-ece12b8c-20250422072221': + resolution: {integrity: sha512-k+LbFh5VICqurRfw5Km9uLixJzqvFFBs53b0aOmZlrm7lyNX2AfoqjEdTzaB7HYKRrJmvNB8dNYeLSo9tjVkdg==} cpu: [x64] os: [win32] - '@rspack/binding@1.3.4': - resolution: {integrity: sha512-wDRqqNfrVXuHAEm25mPlhroKN+v4uwhihVnZF4duz0I0L5rbsUNCy7uEda0GrBXkj3jkKLfg60mSd9MCZD0JZw==} + '@rspack-canary/binding@1.3.6-canary-ece12b8c-20250422072221': + resolution: {integrity: sha512-ABRmk8UgqzzSLFuuNnQFNuNx1NZNIuS7VArKJOXHuqxZPk0dC+tpzKTdg2Dd+Qkxh7vS+mJtRQBCVT157MkTRw==} - '@rspack/binding@1.3.5': - resolution: {integrity: sha512-2oluCT+iBnTg0w7XfR8AmfkvgMPSuqEndzhrlHY//qgyyI04CW1lCMgsh+9wcSOUWUKYSOMCiGiVlYFtae5Lcg==} - - '@rspack/core@1.3.4': - resolution: {integrity: sha512-NIIk/0XUkyU9G8eby6kKO3YFpeDn8RsUIzNuElcfi1rWuuK+NLasDqUYOFqqlNBKnZpmtZ+SXAV9jE5k/i3uwg==} + '@rspack-canary/core@1.3.6-canary-ece12b8c-20250422072221': + resolution: {integrity: sha512-Iw7sIc375d9PnBYzJeuEo0oV6y78HNBCvDcDi6rDNO7NWw02sw+W42nYSO+EeRLwIlRLYHL+W0kHz/G6J5aFeg==} engines: {node: '>=16.0.0'} peerDependencies: - '@rspack/tracing': ^1.x '@swc/helpers': '>=0.5.1' peerDependenciesMeta: - '@rspack/tracing': - optional: true - '@swc/helpers': - optional: true - - '@rspack/core@1.3.5': - resolution: {integrity: sha512-PwIpzXj9wjHM0Ohq6geIKPoh3yNb5oSK74gqzs0plR7pTYLbhrjG/1DSV/JLFF4C5WCpLHHiDEX5E0IYm2Aqeg==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@rspack/tracing': ^1.x - '@swc/helpers': '>=0.5.1' - peerDependenciesMeta: - '@rspack/tracing': - optional: true '@swc/helpers': optional: true @@ -3446,8 +3365,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001707: - resolution: {integrity: sha512-3qtRjw/HQSMlDWf+X79N206fepf4SOOU6SQLMaq/0KkZLmSjPxAkBOQQ+FxbHKfHmYLZFfdWsO3KA90ceHPSnw==} + caniuse-lite@1.0.30001715: + resolution: {integrity: sha512-7ptkFGMm2OAOgvZpwgA4yjQ5SQbrNVGdRjzH0pBdy1Fasvcr+KAeECmbCAECzTuDuoX0FCY8KzUxjf9+9kfZEw==} case-sensitive-paths-webpack-plugin@2.4.0: resolution: {integrity: sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw==} @@ -6472,12 +6391,9 @@ packages: resolution: {integrity: sha512-Ohe29p3gwJiu1kxq16P80g1qq0FxGtwQevKctLE4su8KUq+Ea06Q6lp7SpcJjaKNrWIuEZQGvESUPt8JpukKVw==} engines: {node: '>= 18.12.0'} peerDependencies: - '@rspack/core': 0.x || 1.x stylus: '>=0.52.4' webpack: ^5.0.0 peerDependenciesMeta: - '@rspack/core': - optional: true webpack: optional: true @@ -6653,11 +6569,7 @@ packages: resolution: {integrity: sha512-BlpPqnfAmV0TcDg58H+1qV8Zb57ilv0x+ajjnxrVQ6BWgC8HzAdc+TycqDOJ4sZZYIV+hywQGozZFGklzbCR6A==} engines: {node: '>=16.0.0'} peerDependencies: - '@rspack/core': ^1.0.0 typescript: '>=3.8.0' - peerDependenciesMeta: - '@rspack/core': - optional: true ts-dedent@2.2.0: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} @@ -7953,7 +7865,7 @@ snapshots: '@modern-js/utils@2.65.1': dependencies: '@swc/helpers': 0.5.13 - caniuse-lite: 1.0.30001707 + caniuse-lite: 1.0.30001715 lodash: 4.17.21 rslog: 1.2.3 @@ -8013,7 +7925,7 @@ snapshots: - supports-color - utf-8-validate - '@module-federation/enhanced@0.12.0(@rspack/core@1.3.5(@swc/helpers@0.5.17))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0)': + '@module-federation/enhanced@0.12.0(@swc/helpers@0.5.17)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0)': dependencies: '@module-federation/bridge-react-webpack-plugin': 0.12.0 '@module-federation/cli': 0.12.0(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3)) @@ -8023,7 +7935,7 @@ snapshots: '@module-federation/inject-external-runtime-core-plugin': 0.12.0(@module-federation/runtime-tools@0.12.0) '@module-federation/managers': 0.12.0 '@module-federation/manifest': 0.12.0(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3)) - '@module-federation/rspack': 0.12.0(@rspack/core@1.3.5(@swc/helpers@0.5.17))(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3)) + '@module-federation/rspack': 0.12.0(@swc/helpers@0.5.17)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3)) '@module-federation/runtime-tools': 0.12.0 '@module-federation/sdk': 0.12.0 btoa: 1.2.1 @@ -8034,7 +7946,7 @@ snapshots: vue-tsc: 2.2.8(typescript@5.8.3) webpack: 5.98.0 transitivePeerDependencies: - - '@rspack/core' + - '@swc/helpers' - bufferutil - debug - react @@ -8042,7 +7954,34 @@ snapshots: - supports-color - utf-8-validate - '@module-federation/error-codes@0.11.2': {} + '@module-federation/enhanced@0.12.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0)': + dependencies: + '@module-federation/bridge-react-webpack-plugin': 0.12.0 + '@module-federation/cli': 0.12.0(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3)) + '@module-federation/data-prefetch': 0.12.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + '@module-federation/dts-plugin': 0.12.0(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3)) + '@module-federation/error-codes': 0.12.0 + '@module-federation/inject-external-runtime-core-plugin': 0.12.0(@module-federation/runtime-tools@0.12.0) + '@module-federation/managers': 0.12.0 + '@module-federation/manifest': 0.12.0(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3)) + '@module-federation/rspack': 0.12.0(@swc/helpers@0.5.17)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3)) + '@module-federation/runtime-tools': 0.12.0 + '@module-federation/sdk': 0.12.0 + btoa: 1.2.1 + schema-utils: 4.3.0 + upath: 2.0.1 + optionalDependencies: + typescript: 5.8.3 + vue-tsc: 2.2.8(typescript@5.8.3) + webpack: 5.98.0 + transitivePeerDependencies: + - '@swc/helpers' + - bufferutil + - debug + - react + - react-dom + - supports-color + - utf-8-validate '@module-federation/error-codes@0.12.0': {} @@ -8071,14 +8010,14 @@ snapshots: - utf-8-validate - vue-tsc - '@module-federation/rsbuild-plugin@0.12.0(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0)': + '@module-federation/rsbuild-plugin@0.12.0(@rsbuild/core@1.3.9)(@swc/helpers@0.5.17)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0)': dependencies: - '@module-federation/enhanced': 0.12.0(@rspack/core@1.3.5(@swc/helpers@0.5.17))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0) + '@module-federation/enhanced': 0.12.0(@swc/helpers@0.5.17)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0) '@module-federation/sdk': 0.12.0 optionalDependencies: '@rsbuild/core': 1.3.9 transitivePeerDependencies: - - '@rspack/core' + - '@swc/helpers' - bufferutil - debug - react @@ -8089,7 +8028,25 @@ snapshots: - vue-tsc - webpack - '@module-federation/rspack@0.12.0(@rspack/core@1.3.5(@swc/helpers@0.5.17))(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))': + '@module-federation/rsbuild-plugin@0.12.0(@rsbuild/core@1.3.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0)': + dependencies: + '@module-federation/enhanced': 0.12.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0) + '@module-federation/sdk': 0.12.0 + optionalDependencies: + '@rsbuild/core': 1.3.9 + transitivePeerDependencies: + - '@swc/helpers' + - bufferutil + - debug + - react + - react-dom + - supports-color + - typescript + - utf-8-validate + - vue-tsc + - webpack + + '@module-federation/rspack@0.12.0(@swc/helpers@0.5.17)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))': dependencies: '@module-federation/bridge-react-webpack-plugin': 0.12.0 '@module-federation/dts-plugin': 0.12.0(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3)) @@ -8098,56 +8055,39 @@ snapshots: '@module-federation/manifest': 0.12.0(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3)) '@module-federation/runtime-tools': 0.12.0 '@module-federation/sdk': 0.12.0 - '@rspack/core': 1.3.5(@swc/helpers@0.5.17) + '@rspack/core': '@rspack-canary/core@1.3.6-canary-ece12b8c-20250422072221(@swc/helpers@0.5.17)' btoa: 1.2.1 optionalDependencies: typescript: 5.8.3 vue-tsc: 2.2.8(typescript@5.8.3) transitivePeerDependencies: + - '@swc/helpers' - bufferutil - debug - supports-color - utf-8-validate - '@module-federation/runtime-core@0.11.2': - dependencies: - '@module-federation/error-codes': 0.11.2 - '@module-federation/sdk': 0.11.2 - '@module-federation/runtime-core@0.12.0': dependencies: '@module-federation/error-codes': 0.12.0 '@module-federation/sdk': 0.12.0 - '@module-federation/runtime-tools@0.11.2': - dependencies: - '@module-federation/runtime': 0.11.2 - '@module-federation/webpack-bundler-runtime': 0.11.2 - '@module-federation/runtime-tools@0.12.0': dependencies: '@module-federation/runtime': 0.12.0 '@module-federation/webpack-bundler-runtime': 0.12.0 - '@module-federation/runtime@0.11.2': - dependencies: - '@module-federation/error-codes': 0.11.2 - '@module-federation/runtime-core': 0.11.2 - '@module-federation/sdk': 0.11.2 - '@module-federation/runtime@0.12.0': dependencies: '@module-federation/error-codes': 0.12.0 '@module-federation/runtime-core': 0.12.0 '@module-federation/sdk': 0.12.0 - '@module-federation/sdk@0.11.2': {} - '@module-federation/sdk@0.12.0': {} - '@module-federation/storybook-addon@4.0.13(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(@storybook/core@8.6.12(prettier@3.5.3)(storybook@8.6.12(prettier@3.5.3)))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack-virtual-modules@0.6.2)(webpack@5.98.0)': + '@module-federation/storybook-addon@4.0.13(@rsbuild/core@1.3.9)(@storybook/core@8.6.12(prettier@3.5.3)(storybook@8.6.12(prettier@3.5.3)))(@swc/helpers@0.5.17)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack-virtual-modules@0.6.2)(webpack@5.98.0)': dependencies: - '@module-federation/enhanced': 0.12.0(@rspack/core@1.3.5(@swc/helpers@0.5.17))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0) + '@module-federation/enhanced': 0.12.0(@swc/helpers@0.5.17)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(vue-tsc@2.2.8(typescript@5.8.3))(webpack@5.98.0) '@module-federation/sdk': 0.12.0 optionalDependencies: '@rsbuild/core': 1.3.9 @@ -8155,7 +8095,7 @@ snapshots: webpack: 5.98.0 webpack-virtual-modules: 0.6.2 transitivePeerDependencies: - - '@rspack/core' + - '@swc/helpers' - bufferutil - debug - react @@ -8171,11 +8111,6 @@ snapshots: fs-extra: 9.1.0 resolve: 1.22.8 - '@module-federation/webpack-bundler-runtime@0.11.2': - dependencies: - '@module-federation/runtime': 0.11.2 - '@module-federation/sdk': 0.11.2 - '@module-federation/webpack-bundler-runtime@0.12.0': dependencies: '@module-federation/runtime': 0.12.0 @@ -8320,33 +8255,27 @@ snapshots: '@rsbuild/core@1.3.6': dependencies: - '@rspack/core': 1.3.4(@swc/helpers@0.5.17) + '@rspack/core': '@rspack-canary/core@1.3.6-canary-ece12b8c-20250422072221(@swc/helpers@0.5.17)' '@rspack/lite-tapable': 1.0.1 '@swc/helpers': 0.5.17 core-js: 3.41.0 jiti: 2.4.2 - transitivePeerDependencies: - - '@rspack/tracing' '@rsbuild/core@1.3.8': dependencies: - '@rspack/core': 1.3.5(@swc/helpers@0.5.17) + '@rspack/core': '@rspack-canary/core@1.3.6-canary-ece12b8c-20250422072221(@swc/helpers@0.5.17)' '@rspack/lite-tapable': 1.0.1 '@swc/helpers': 0.5.17 core-js: 3.41.0 jiti: 2.4.2 - transitivePeerDependencies: - - '@rspack/tracing' '@rsbuild/core@1.3.9': dependencies: - '@rspack/core': 1.3.5(@swc/helpers@0.5.17) + '@rspack/core': '@rspack-canary/core@1.3.6-canary-ece12b8c-20250422072221(@swc/helpers@0.5.17)' '@rspack/lite-tapable': 1.0.1 '@swc/helpers': 0.5.17 core-js: 3.41.0 jiti: 2.4.2 - transitivePeerDependencies: - - '@rspack/tracing' '@rsbuild/plugin-babel@1.0.5(@rsbuild/core@1.3.9)': dependencies: @@ -8429,15 +8358,15 @@ snapshots: reduce-configs: 1.1.0 sass-embedded: 1.86.0 - '@rsbuild/plugin-stylus@1.1.1(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(webpack@5.98.0)': + '@rsbuild/plugin-stylus@1.1.1(@rsbuild/core@1.3.9)(@swc/helpers@0.5.17)(webpack@5.98.0)': dependencies: '@rsbuild/core': 1.3.9 deepmerge: 4.3.1 reduce-configs: 1.1.0 stylus: 0.64.0 - stylus-loader: 8.1.1(@rspack/core@1.3.5(@swc/helpers@0.5.17))(stylus@0.64.0)(webpack@5.98.0) + stylus-loader: 8.1.1(@swc/helpers@0.5.17)(stylus@0.64.0)(webpack@5.98.0) transitivePeerDependencies: - - '@rspack/core' + - '@swc/helpers' - supports-color - webpack @@ -8461,16 +8390,16 @@ snapshots: optionalDependencies: '@rsbuild/core': 1.3.9 - '@rsbuild/plugin-type-check@1.2.1(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(typescript@5.8.3)': + '@rsbuild/plugin-type-check@1.2.1(@rsbuild/core@1.3.9)(@swc/helpers@0.5.17)(typescript@5.8.3)': dependencies: deepmerge: 4.3.1 json5: 2.2.3 reduce-configs: 1.1.0 - ts-checker-rspack-plugin: 1.1.1(@rspack/core@1.3.5(@swc/helpers@0.5.17))(typescript@5.8.3) + ts-checker-rspack-plugin: 1.1.1(@swc/helpers@0.5.17)(typescript@5.8.3) optionalDependencies: '@rsbuild/core': 1.3.9 transitivePeerDependencies: - - '@rspack/core' + - '@swc/helpers' - typescript '@rsbuild/plugin-typed-css-modules@1.0.2(@rsbuild/core@1.3.9)': @@ -8502,102 +8431,52 @@ snapshots: optionalDependencies: '@microsoft/api-extractor': 7.52.4(@types/node@22.8.1) typescript: 5.8.3 - transitivePeerDependencies: - - '@rspack/tracing' - '@rspack/binding-darwin-arm64@1.3.4': + '@rspack-canary/binding-darwin-arm64@1.3.6-canary-ece12b8c-20250422072221': optional: true - '@rspack/binding-darwin-arm64@1.3.5': + '@rspack-canary/binding-darwin-x64@1.3.6-canary-ece12b8c-20250422072221': optional: true - '@rspack/binding-darwin-x64@1.3.4': + '@rspack-canary/binding-linux-arm64-gnu@1.3.6-canary-ece12b8c-20250422072221': optional: true - '@rspack/binding-darwin-x64@1.3.5': + '@rspack-canary/binding-linux-arm64-musl@1.3.6-canary-ece12b8c-20250422072221': optional: true - '@rspack/binding-linux-arm64-gnu@1.3.4': + '@rspack-canary/binding-linux-x64-gnu@1.3.6-canary-ece12b8c-20250422072221': optional: true - '@rspack/binding-linux-arm64-gnu@1.3.5': + '@rspack-canary/binding-linux-x64-musl@1.3.6-canary-ece12b8c-20250422072221': optional: true - '@rspack/binding-linux-arm64-musl@1.3.4': + '@rspack-canary/binding-win32-arm64-msvc@1.3.6-canary-ece12b8c-20250422072221': optional: true - '@rspack/binding-linux-arm64-musl@1.3.5': + '@rspack-canary/binding-win32-ia32-msvc@1.3.6-canary-ece12b8c-20250422072221': optional: true - '@rspack/binding-linux-x64-gnu@1.3.4': + '@rspack-canary/binding-win32-x64-msvc@1.3.6-canary-ece12b8c-20250422072221': optional: true - '@rspack/binding-linux-x64-gnu@1.3.5': - optional: true - - '@rspack/binding-linux-x64-musl@1.3.4': - optional: true - - '@rspack/binding-linux-x64-musl@1.3.5': - optional: true - - '@rspack/binding-win32-arm64-msvc@1.3.4': - optional: true - - '@rspack/binding-win32-arm64-msvc@1.3.5': - optional: true - - '@rspack/binding-win32-ia32-msvc@1.3.4': - optional: true - - '@rspack/binding-win32-ia32-msvc@1.3.5': - optional: true - - '@rspack/binding-win32-x64-msvc@1.3.4': - optional: true - - '@rspack/binding-win32-x64-msvc@1.3.5': - optional: true - - '@rspack/binding@1.3.4': - optionalDependencies: - '@rspack/binding-darwin-arm64': 1.3.4 - '@rspack/binding-darwin-x64': 1.3.4 - '@rspack/binding-linux-arm64-gnu': 1.3.4 - '@rspack/binding-linux-arm64-musl': 1.3.4 - '@rspack/binding-linux-x64-gnu': 1.3.4 - '@rspack/binding-linux-x64-musl': 1.3.4 - '@rspack/binding-win32-arm64-msvc': 1.3.4 - '@rspack/binding-win32-ia32-msvc': 1.3.4 - '@rspack/binding-win32-x64-msvc': 1.3.4 - - '@rspack/binding@1.3.5': - optionalDependencies: - '@rspack/binding-darwin-arm64': 1.3.5 - '@rspack/binding-darwin-x64': 1.3.5 - '@rspack/binding-linux-arm64-gnu': 1.3.5 - '@rspack/binding-linux-arm64-musl': 1.3.5 - '@rspack/binding-linux-x64-gnu': 1.3.5 - '@rspack/binding-linux-x64-musl': 1.3.5 - '@rspack/binding-win32-arm64-msvc': 1.3.5 - '@rspack/binding-win32-ia32-msvc': 1.3.5 - '@rspack/binding-win32-x64-msvc': 1.3.5 - - '@rspack/core@1.3.4(@swc/helpers@0.5.17)': - dependencies: - '@module-federation/runtime-tools': 0.11.2 - '@rspack/binding': 1.3.4 - '@rspack/lite-tapable': 1.0.1 - caniuse-lite: 1.0.30001707 + '@rspack-canary/binding@1.3.6-canary-ece12b8c-20250422072221': optionalDependencies: - '@swc/helpers': 0.5.17 - - '@rspack/core@1.3.5(@swc/helpers@0.5.17)': + '@rspack/binding-darwin-arm64': '@rspack-canary/binding-darwin-arm64@1.3.6-canary-ece12b8c-20250422072221' + '@rspack/binding-darwin-x64': '@rspack-canary/binding-darwin-x64@1.3.6-canary-ece12b8c-20250422072221' + '@rspack/binding-linux-arm64-gnu': '@rspack-canary/binding-linux-arm64-gnu@1.3.6-canary-ece12b8c-20250422072221' + '@rspack/binding-linux-arm64-musl': '@rspack-canary/binding-linux-arm64-musl@1.3.6-canary-ece12b8c-20250422072221' + '@rspack/binding-linux-x64-gnu': '@rspack-canary/binding-linux-x64-gnu@1.3.6-canary-ece12b8c-20250422072221' + '@rspack/binding-linux-x64-musl': '@rspack-canary/binding-linux-x64-musl@1.3.6-canary-ece12b8c-20250422072221' + '@rspack/binding-win32-arm64-msvc': '@rspack-canary/binding-win32-arm64-msvc@1.3.6-canary-ece12b8c-20250422072221' + '@rspack/binding-win32-ia32-msvc': '@rspack-canary/binding-win32-ia32-msvc@1.3.6-canary-ece12b8c-20250422072221' + '@rspack/binding-win32-x64-msvc': '@rspack-canary/binding-win32-x64-msvc@1.3.6-canary-ece12b8c-20250422072221' + + '@rspack-canary/core@1.3.6-canary-ece12b8c-20250422072221(@swc/helpers@0.5.17)': dependencies: - '@module-federation/runtime-tools': 0.11.2 - '@rspack/binding': 1.3.5 + '@module-federation/runtime-tools': 0.12.0 + '@rspack/binding': '@rspack-canary/binding@1.3.6-canary-ece12b8c-20250422072221' '@rspack/lite-tapable': 1.0.1 - caniuse-lite: 1.0.30001707 + caniuse-lite: 1.0.30001715 optionalDependencies: '@swc/helpers': 0.5.17 @@ -8659,7 +8538,6 @@ snapshots: unist-util-visit: 5.0.0 unist-util-visit-children: 3.0.0 transitivePeerDependencies: - - '@rspack/tracing' - '@types/react' - acorn - supports-color @@ -8703,20 +8581,14 @@ snapshots: '@rspress/plugin-auto-nav-sidebar@2.0.0-alpha-canary-202504162001': dependencies: '@rspress/shared': 2.0.0-alpha-canary-202504162001 - transitivePeerDependencies: - - '@rspack/tracing' '@rspress/plugin-container-syntax@2.0.0-alpha-canary-202504162001': dependencies: '@rspress/shared': 2.0.0-alpha-canary-202504162001 - transitivePeerDependencies: - - '@rspack/tracing' '@rspress/plugin-last-updated@2.0.0-alpha-canary-202504162001': dependencies: '@rspress/shared': 2.0.0-alpha-canary-202504162001 - transitivePeerDependencies: - - '@rspack/tracing' '@rspress/plugin-medium-zoom@2.0.0-alpha-canary-202504162001(@rspress/runtime@2.0.0-alpha-canary-202504162001)': dependencies: @@ -8730,8 +8602,6 @@ snapshots: react-dom: 18.3.1(react@18.3.1) react-helmet-async: 2.0.5(react@18.3.1) react-router-dom: 6.29.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - transitivePeerDependencies: - - '@rspack/tracing' '@rspress/shared@2.0.0-alpha-canary-202504162001': dependencies: @@ -8739,8 +8609,6 @@ snapshots: gray-matter: 4.0.3 lodash-es: 4.17.21 unified: 11.0.5 - transitivePeerDependencies: - - '@rspack/tracing' '@rspress/theme-default@2.0.0-alpha-canary-202504162001': dependencies: @@ -8758,8 +8626,6 @@ snapshots: react-dom: 18.3.1(react@18.3.1) react-helmet-async: 2.0.5(react@18.3.1) react-syntax-highlighter: 15.6.1(react@18.3.1) - transitivePeerDependencies: - - '@rspack/tracing' '@rstack-dev/doc-ui@1.7.4(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': dependencies: @@ -9688,7 +9554,7 @@ snapshots: browserslist@4.24.4: dependencies: - caniuse-lite: 1.0.30001707 + caniuse-lite: 1.0.30001715 electron-to-chromium: 1.5.88 node-releases: 2.0.19 update-browserslist-db: 1.1.1(browserslist@4.24.4) @@ -9751,7 +9617,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001707: {} + caniuse-lite@1.0.30001715: {} case-sensitive-paths-webpack-plugin@2.4.0: {} @@ -12856,7 +12722,6 @@ snapshots: chokidar: 3.6.0 picocolors: 1.1.1 transitivePeerDependencies: - - '@rspack/tracing' - '@types/react' - acorn - supports-color @@ -13180,18 +13045,18 @@ snapshots: stdin-discarder@0.2.2: {} - storybook-addon-rslib@1.0.1(@rsbuild/core@1.3.9)(@rslib/core@packages+core)(storybook-builder-rsbuild@1.0.1(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(@types/react@19.1.2)(storybook@8.6.12(prettier@3.5.3))(typescript@5.8.3)(webpack-sources@3.2.3))(typescript@5.8.3): + storybook-addon-rslib@1.0.1(@rsbuild/core@1.3.9)(@rslib/core@packages+core)(storybook-builder-rsbuild@1.0.1(@rsbuild/core@1.3.9)(@swc/helpers@0.5.17)(@types/react@19.1.2)(storybook@8.6.12(prettier@3.5.3))(typescript@5.8.3)(webpack-sources@3.2.3))(typescript@5.8.3): dependencies: '@rsbuild/core': 1.3.9 '@rslib/core': link:packages/core - storybook-builder-rsbuild: 1.0.1(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(@types/react@19.1.2)(storybook@8.6.12(prettier@3.5.3))(typescript@5.8.3)(webpack-sources@3.2.3) + storybook-builder-rsbuild: 1.0.1(@rsbuild/core@1.3.9)(@swc/helpers@0.5.17)(@types/react@19.1.2)(storybook@8.6.12(prettier@3.5.3))(typescript@5.8.3)(webpack-sources@3.2.3) optionalDependencies: typescript: 5.8.3 - storybook-builder-rsbuild@1.0.1(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(@types/react@19.1.2)(storybook@8.6.12(prettier@3.5.3))(typescript@5.8.3)(webpack-sources@3.2.3): + storybook-builder-rsbuild@1.0.1(@rsbuild/core@1.3.9)(@swc/helpers@0.5.17)(@types/react@19.1.2)(storybook@8.6.12(prettier@3.5.3))(typescript@5.8.3)(webpack-sources@3.2.3): dependencies: '@rsbuild/core': 1.3.9 - '@rsbuild/plugin-type-check': 1.2.1(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(typescript@5.8.3) + '@rsbuild/plugin-type-check': 1.2.1(@rsbuild/core@1.3.9)(@swc/helpers@0.5.17)(typescript@5.8.3) '@storybook/addon-docs': 8.4.2(@types/react@19.1.2)(storybook@8.6.12(prettier@3.5.3))(webpack-sources@3.2.3) '@storybook/core-webpack': 8.4.2(storybook@8.6.12(prettier@3.5.3)) browser-assert: 1.2.1 @@ -13214,11 +13079,11 @@ snapshots: optionalDependencies: typescript: 5.8.3 transitivePeerDependencies: - - '@rspack/core' + - '@swc/helpers' - '@types/react' - webpack-sources - storybook-react-rsbuild@1.0.1(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(@types/react@19.1.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(rollup@4.39.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.8.3)(webpack-sources@3.2.3)(webpack@5.98.0): + storybook-react-rsbuild@1.0.1(@rsbuild/core@1.3.9)(@swc/helpers@0.5.17)(@types/react@19.1.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(rollup@4.39.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.8.3)(webpack-sources@3.2.3)(webpack@5.98.0): dependencies: '@rollup/pluginutils': 5.1.4(rollup@4.39.0) '@rsbuild/core': 1.3.9 @@ -13233,13 +13098,13 @@ snapshots: react-dom: 19.1.0(react@19.1.0) resolve: 1.22.10 storybook: 8.6.12(prettier@3.5.3) - storybook-builder-rsbuild: 1.0.1(@rsbuild/core@1.3.9)(@rspack/core@1.3.5(@swc/helpers@0.5.17))(@types/react@19.1.2)(storybook@8.6.12(prettier@3.5.3))(typescript@5.8.3)(webpack-sources@3.2.3) + storybook-builder-rsbuild: 1.0.1(@rsbuild/core@1.3.9)(@swc/helpers@0.5.17)(@types/react@19.1.2)(storybook@8.6.12(prettier@3.5.3))(typescript@5.8.3)(webpack-sources@3.2.3) tsconfig-paths: 4.2.0 optionalDependencies: typescript: 5.8.3 transitivePeerDependencies: - - '@rspack/core' - '@storybook/test' + - '@swc/helpers' - '@types/react' - rollup - supports-color @@ -13335,14 +13200,16 @@ snapshots: dependencies: inline-style-parser: 0.2.4 - stylus-loader@8.1.1(@rspack/core@1.3.5(@swc/helpers@0.5.17))(stylus@0.64.0)(webpack@5.98.0): + stylus-loader@8.1.1(@swc/helpers@0.5.17)(stylus@0.64.0)(webpack@5.98.0): dependencies: + '@rspack/core': '@rspack-canary/core@1.3.6-canary-ece12b8c-20250422072221(@swc/helpers@0.5.17)' fast-glob: 3.3.2 normalize-path: 3.0.0 stylus: 0.64.0 optionalDependencies: - '@rspack/core': 1.3.5(@swc/helpers@0.5.17) webpack: 5.98.0 + transitivePeerDependencies: + - '@swc/helpers' stylus@0.64.0: dependencies: @@ -13523,17 +13390,18 @@ snapshots: trough@2.2.0: {} - ts-checker-rspack-plugin@1.1.1(@rspack/core@1.3.5(@swc/helpers@0.5.17))(typescript@5.8.3): + ts-checker-rspack-plugin@1.1.1(@swc/helpers@0.5.17)(typescript@5.8.3): dependencies: '@babel/code-frame': 7.26.2 + '@rspack/core': '@rspack-canary/core@1.3.6-canary-ece12b8c-20250422072221(@swc/helpers@0.5.17)' '@rspack/lite-tapable': 1.0.1 chokidar: 3.6.0 memfs: 4.17.0 minimatch: 9.0.5 picocolors: 1.1.1 typescript: 5.8.3 - optionalDependencies: - '@rspack/core': 1.3.5(@swc/helpers@0.5.17) + transitivePeerDependencies: + - '@swc/helpers' 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 88d850b1b..7cfcf5a8a 100644 --- a/tests/integration/alias/__snapshots__/index.test.ts.snap +++ b/tests/integration/alias/__snapshots__/index.test.ts.snap @@ -19,8 +19,8 @@ Object.defineProperty(exports, '__esModule', { `; exports[`source.alias 3`] = ` -"import * as __WEBPACK_EXTERNAL_MODULE__a_js_256e6de1__ from "./a.js"; -console.info(__WEBPACK_EXTERNAL_MODULE__a_js_256e6de1__.a); +"import { a } from "./a.js"; +console.info(a); " `; diff --git a/tests/integration/alias/index.test.ts b/tests/integration/alias/index.test.ts index 49de522c8..6ed711dd5 100644 --- a/tests/integration/alias/index.test.ts +++ b/tests/integration/alias/index.test.ts @@ -27,9 +27,7 @@ test('source.alias', async () => { expect(indexBundleCjsContent).toContain('hello world'); // bundleless mode - expect(indexBundlelessEsmContent).toContain( - 'import * as __WEBPACK_EXTERNAL_MODULE__a_js_256e6de1__ from "./a.js";', - ); + expect(indexBundlelessEsmContent).toContain('import { a } 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 18d0ca814..847679fb7 100644 --- a/tests/integration/asset/__snapshots__/index.test.ts.snap +++ b/tests/integration/asset/__snapshots__/index.test.ts.snap @@ -26,24 +26,24 @@ export { draft_namespaceObject as default }; exports[`use svgr > mixedImport: true should contain export { url as default, ReactComponent } 1`] = ` "import __rslib_svgr_url__0__ from "../static/svg/logo.svg"; -import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime"; +import { jsx, jsxs } from "react/jsx-runtime"; import "react"; -const SvgLogo = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("svg", { +const SvgLogo = (props)=>/*#__PURE__*/ 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_225474f2__.jsxs)("g", { + children: /*#__PURE__*/ jsxs("g", { fill: "#61DAFB", children: [ - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { + /*#__PURE__*/ 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_225474f2__.jsx)("circle", { + /*#__PURE__*/ jsx("circle", { cx: 420.9, cy: 296.5, r: 45.7 }), - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { + /*#__PURE__*/ jsx("path", { d: "M520.5 78.1" }) ] @@ -121,24 +121,24 @@ Object.defineProperty(exports, '__esModule', { `; exports[`use svgr > should only contain svgr default export 1`] = ` -"import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime"; +"import { jsx, jsxs } from "react/jsx-runtime"; import "react"; -const SvgLogo = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("svg", { +const SvgLogo = (props)=>/*#__PURE__*/ 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_225474f2__.jsxs)("g", { + children: /*#__PURE__*/ jsxs("g", { fill: "#61DAFB", children: [ - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { + /*#__PURE__*/ 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_225474f2__.jsx)("circle", { + /*#__PURE__*/ jsx("circle", { cx: 420.9, cy: 296.5, r: 45.7 }), - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { + /*#__PURE__*/ jsx("path", { d: "M520.5 78.1" }) ] @@ -248,24 +248,24 @@ Object.defineProperty(exports, '__esModule', { exports[`use svgr 1`] = ` "import __rslib_svgr_url__0__ from "./static/svg/logo.svg"; -import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime"; +import { jsx, jsxs } from "react/jsx-runtime"; import "react"; -const SvgLogo = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("svg", { +const SvgLogo = (props)=>/*#__PURE__*/ 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_225474f2__.jsxs)("g", { + children: /*#__PURE__*/ jsxs("g", { fill: "#61DAFB", children: [ - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { + /*#__PURE__*/ 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_225474f2__.jsx)("circle", { + /*#__PURE__*/ jsx("circle", { cx: 420.9, cy: 296.5, r: 45.7 }), - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { + /*#__PURE__*/ jsx("path", { d: "M520.5 78.1" }) ] @@ -275,22 +275,22 @@ const logoreact = SvgLogo; import logourl_namespaceObject from "./static/svg/logo.svg"; console.log('queryImport', 'ReactComponent', logoreact); console.log('queryImport', 'Url', logourl_namespaceObject); -const logo_SvgLogo = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("svg", { +const logo_SvgLogo = (props)=>/*#__PURE__*/ 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_225474f2__.jsxs)("g", { + children: /*#__PURE__*/ jsxs("g", { fill: "#61DAFB", children: [ - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { + /*#__PURE__*/ 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_225474f2__.jsx)("circle", { + /*#__PURE__*/ jsx("circle", { cx: 420.9, cy: 296.5, r: 45.7 }), - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { + /*#__PURE__*/ jsx("path", { d: "M520.5 78.1" }) ] diff --git a/tests/integration/asset/index.test.ts b/tests/integration/asset/index.test.ts index f41449caf..2ce1135de 100644 --- a/tests/integration/asset/index.test.ts +++ b/tests/integration/asset/index.test.ts @@ -35,8 +35,8 @@ test('set the size threshold to inline static assets', async () => { const { content: indexJs2 } = queryContent(contents.esm2!, /index\.js/); const { content: logoJs2 } = queryContent(contents.esm2!, /assets\/logo\.js/); expect(indexJs2).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE__assets_logo_js_450929b7__ from "./assets/logo.js"; - const src = __WEBPACK_EXTERNAL_MODULE__assets_logo_js_450929b7__["default"]; + "import default_0 from "./assets/logo.js"; + const src = default_0; export { src as default }; " `); diff --git a/tests/integration/auto-external/index.test.ts b/tests/integration/auto-external/index.test.ts index eb367c788..44f9bbd92 100644 --- a/tests/integration/auto-external/index.test.ts +++ b/tests/integration/auto-external/index.test.ts @@ -8,9 +8,7 @@ test('auto external default should works', async () => { const fixturePath = join(__dirname, 'default'); const { js, dts } = await buildAndGetResults({ fixturePath, type: 'all' }); - expect(js.entries.esm).toContain( - 'import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react"', - ); + expect(js.entries.esm).toContain('import default_0 from "react"'); expect(js!.entries.cjs).toContain( 'const external_react_namespaceObject = require("react");', @@ -25,12 +23,8 @@ test('auto external sub path should works', async () => { const fixturePath = join(__dirname, 'external-sub-path'); const { entries } = await buildAndGetResults({ fixturePath }); - expect(entries.esm).toContain( - 'import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react"', - ); - expect(entries.esm).toContain( - 'import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime"', - ); + expect(entries.esm).toContain('import default_0 from "react"'); + expect(entries.esm).toContain('import default_1 from "react/jsx-runtime"'); expect(entries.cjs).toContain( 'const external_react_namespaceObject = require("react");', @@ -45,7 +39,7 @@ test('auto external should be disabled when bundle is false', async () => { const { js } = await buildAndGetResults({ fixturePath, type: 'all' }); expect(Object.values(js.contents.esm)[0]).toContain( - 'import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react"', + 'import default_0 from "react"', ); expect(Object.values(js.contents.cjs)[0]).toContain( @@ -57,9 +51,7 @@ test('auto external false should works', async () => { const fixturePath = join(__dirname, 'false'); const { js, dts } = await buildAndGetResults({ fixturePath, type: 'all' }); - expect(js.entries.esm).not.toContain( - 'import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react"', - ); + expect(js.entries.esm).not.toContain('import default_0 from "react"'); expect(js.entries.cjs).not.toContain( 'const external_react_namespaceObject = require("react");', @@ -74,9 +66,7 @@ test('externals should overrides auto external', async () => { const fixturePath = join(__dirname, 'with-externals'); const { entries } = await buildAndGetResults({ fixturePath }); - expect(entries.esm).toContain( - 'import * as __WEBPACK_EXTERNAL_MODULE_react1__ from "react1"', - ); + expect(entries.esm).toContain('import default_0 from "react1"'); expect(entries.cjs).toContain( 'const external_react1_namespaceObject = require("react1");', diff --git a/tests/integration/bundle-false/__snapshots__/index.test.ts.snap b/tests/integration/bundle-false/__snapshots__/index.test.ts.snap index a1b4399e0..07bd0088a 100644 --- a/tests/integration/bundle-false/__snapshots__/index.test.ts.snap +++ b/tests/integration/bundle-false/__snapshots__/index.test.ts.snap @@ -2,24 +2,24 @@ exports[`svgr in bundleless 1`] = ` "import __rslib_svgr_url__0__ from "../static/svg/logo.svg"; -import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime"; +import { jsx, jsxs } from "react/jsx-runtime"; import "react"; -const SvgLogo = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("svg", { +const SvgLogo = (props)=>/*#__PURE__*/ 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_225474f2__.jsxs)("g", { + children: /*#__PURE__*/ jsxs("g", { fill: "#61DAFB", children: [ - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { + /*#__PURE__*/ 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_225474f2__.jsx)("circle", { + /*#__PURE__*/ jsx("circle", { cx: 420.9, cy: 296.5, r: 45.7 }), - /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", { + /*#__PURE__*/ 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 56b86d56d..63e30179e 100644 --- a/tests/integration/bundle-false/index.test.ts +++ b/tests/integration/bundle-false/index.test.ts @@ -49,28 +49,26 @@ test('basic', async () => { basename: true, }); expect(indexContent).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE__mainFiles1_index_js_c28bc628__ from "./mainFiles1/index.js"; - import * as __WEBPACK_EXTERNAL_MODULE__dep_js_6cc8d1bf__ from "./dep.js"; - export * from "./mainFiles2/index.js"; + "export * from "./mainFiles2/index.js"; export * from "./utils/numbers.js"; export * from "./utils/strings.js"; export * from "./sum.js"; - var __webpack_exports__added = __WEBPACK_EXTERNAL_MODULE__dep_js_6cc8d1bf__.added; - var __webpack_exports__mainFiles1 = __WEBPACK_EXTERNAL_MODULE__mainFiles1_index_js_c28bc628__.mainFiles1; - export { __webpack_exports__added as added, __webpack_exports__mainFiles1 as mainFiles1 }; + import { mainFiles1 } from "./mainFiles1/index.js"; + import { added } from "./dep.js"; + export { added, mainFiles1 }; " `); expect(depContent).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE_dep_add__ from "dep_add"; - const added = (0, __WEBPACK_EXTERNAL_MODULE_dep_add__.add)(1, 2); + "import { add } from "dep_add"; + const added = add(1, 2); export { added }; " `); expect(sumContent).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE__utils_numbers_js_ac3baff3__ from "./utils/numbers.js"; - import * as __WEBPACK_EXTERNAL_MODULE__utils_strings_js_56d354bf__ from "./utils/strings.js"; - const numSum = __WEBPACK_EXTERNAL_MODULE__utils_numbers_js_ac3baff3__.num1 + __WEBPACK_EXTERNAL_MODULE__utils_numbers_js_ac3baff3__.num2 + __WEBPACK_EXTERNAL_MODULE__utils_numbers_js_ac3baff3__.num3; - const strSum = __WEBPACK_EXTERNAL_MODULE__utils_strings_js_56d354bf__.str1 + __WEBPACK_EXTERNAL_MODULE__utils_strings_js_56d354bf__.str2 + __WEBPACK_EXTERNAL_MODULE__utils_strings_js_56d354bf__.str3; + "import { num1, num2, num3 } from "./utils/numbers.js"; + import { str1, str2, str3 } from "./utils/strings.js"; + const numSum = num1 + num2 + num3; + const strSum = str1 + str2 + str3; export { numSum, strSum }; " `); @@ -117,8 +115,8 @@ test('monorepo', async () => { basename: true, }).content, ).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE_bundle_false_monorepo_importee_test_35ca595f__ from "bundle-false-monorepo-importee-test"; - const src = __WEBPACK_EXTERNAL_MODULE_bundle_false_monorepo_importee_test_35ca595f__["default"]; + "import default_0 from "bundle-false-monorepo-importee-test"; + const src = default_0; export { src as default }; " `); @@ -146,10 +144,10 @@ test('auto add js extension for relative import', async () => { // basic esm for (const importer of [ - '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";', + 'import { bar } from "./bar.js";', + 'import { baz } from "./baz.js.js";', + 'import { foo } from "./foo.js";', + 'import { qux } from "./qux.js";', ]) { expect(Object.values(contents.esm0!)[3]).toContain(importer); } @@ -166,10 +164,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_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";', + 'import { bar } from "./bar.mjs";', + 'import { baz } from "./baz.js.mjs";', + 'import { foo } from "./foo.mjs";', + 'import { qux } 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 5dbf3b07d..d7497ac27 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_f500f6c3__ from "@swc/helpers/_/_class_call_check"; -import * as __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class_63e94838__ from "@swc/helpers/_/_create_class"; +"import { _ } from "@swc/helpers/_/_class_call_check"; +import { _ as __0 } from "@swc/helpers/_/_create_class"; var src_FOO = /*#__PURE__*/ function() { "use strict"; function FOO() { - (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_class_call_check_f500f6c3__._)(this, FOO); + _(this, FOO); } - (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class_63e94838__._)(FOO, [ + __0(FOO, [ { key: "bar", get: function() {} @@ -21,14 +21,14 @@ export { src_FOO as default }; `; exports[`should external @swc/helpers when externalHelpers is true 2`] = ` -"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"; +"import { _ } from "@swc/helpers/_/_class_call_check"; +import { _ as __0 } from "@swc/helpers/_/_create_class"; var src_FOO = /*#__PURE__*/ function() { "use strict"; function FOO() { - (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_class_call_check_f500f6c3__._)(this, FOO); + _(this, FOO); } - (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class_63e94838__._)(FOO, [ + __0(FOO, [ { key: "bar", get: function() {} @@ -111,14 +111,14 @@ export { src_FOO as default }; `; exports[`should respect user override externalHelpers config 2`] = ` -"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"; +"import { _ } from "@swc/helpers/_/_class_call_check"; +import { _ as __0 } from "@swc/helpers/_/_create_class"; var src_FOO = /*#__PURE__*/ function() { "use strict"; function FOO() { - (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_class_call_check_f500f6c3__._)(this, FOO); + _(this, FOO); } - (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class_63e94838__._)(FOO, [ + __0(FOO, [ { key: "bar", get: function() {} diff --git a/tests/integration/externals/index.test.ts b/tests/integration/externals/index.test.ts index 9f14d7aca..4fa625acf 100644 --- a/tests/integration/externals/index.test.ts +++ b/tests/integration/externals/index.test.ts @@ -15,9 +15,9 @@ test('auto externalize Node.js built-in modules when `output.target` is "node"', const { entries } = await buildAndGetResults({ fixturePath }); for (const external of [ - 'import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs"', - 'import * as __WEBPACK_EXTERNAL_MODULE_node_assert_3e74d44e__ from "node:assert"', - 'import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react"', + 'import default_0 from "fs"', + 'import default_1 from "node:assert"', + 'import default_2 from "react"', 'import * as __WEBPACK_EXTERNAL_MODULE_bar__ from "bar"', 'module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("foo");', ]) { @@ -86,11 +86,11 @@ test('user externals', async () => { const { entries, contents } = await buildAndGetResults({ fixturePath }); expect(entries.esm0).toMatchInlineSnapshot( ` - "import * as __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__ from "node:fs"; - import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash"; - import * as __WEBPACK_EXTERNAL_MODULE_lodash_zip_41bf8b9e__ from "lodash/zip"; + "import default_0 from "node:fs"; + import default_1 from "lodash"; + import default_2 from "lodash/zip"; const foo = 'foo'; - console.log(__WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"], __WEBPACK_EXTERNAL_MODULE_lodash__["default"].add, __WEBPACK_EXTERNAL_MODULE_lodash_zip_41bf8b9e__["default"], foo); + console.log(default_0, default_1.add, default_2, foo); " `, ); @@ -98,11 +98,11 @@ test('user externals', async () => { expect( queryContent(contents.esm1!, 'index.js', { basename: true }).content, ).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__ from "node:fs"; - import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash"; - import * as __WEBPACK_EXTERNAL_MODULE_lodash_zip_41bf8b9e__ from "lodash/zip"; - import * as __WEBPACK_EXTERNAL_MODULE__foo2_1d132755__ from "./foo2"; - console.log(__WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"], __WEBPACK_EXTERNAL_MODULE_lodash__["default"].add, __WEBPACK_EXTERNAL_MODULE_lodash_zip_41bf8b9e__["default"], __WEBPACK_EXTERNAL_MODULE__foo2_1d132755__.foo); + "import default_0 from "node:fs"; + import default_1 from "lodash"; + import default_2 from "lodash/zip"; + import { foo } from "./foo2"; + console.log(default_0, default_1.add, default_2, foo); " `); }); diff --git a/tests/integration/format/index.test.ts b/tests/integration/format/index.test.ts index 2a25d791a..021852295 100644 --- a/tests/integration/format/index.test.ts +++ b/tests/integration/format/index.test.ts @@ -15,8 +15,8 @@ test('import.meta.url should be preserved', async () => { } `); expect(entries.esm).toMatchInlineSnapshot(` - "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)); + "import default_0 from "node:url"; + const packageDirectory = default_0.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 6f7464dac..553de785b 100644 --- a/tests/integration/minify/index.test.ts +++ b/tests/integration/minify/index.test.ts @@ -8,9 +8,9 @@ describe('minify config', () => { 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_225474f2__ from "react/jsx-runtime"; + import { jsx } from "react/jsx-runtime"; /*! Legal Comment */ const foo = ()=>{}; - const Button = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)('button', {}); + const Button = ()=>/*#__PURE__*/ jsx('button', {}); export { Button, foo }; " `); @@ -20,7 +20,7 @@ describe('minify config', () => { const fixturePath = join(__dirname, 'config/disabled'); const { entries } = await buildAndGetResults({ fixturePath }); expect(entries.esm).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime"; + "import { jsx } from "react/jsx-runtime"; ;// CONCATENATED MODULE: external "react/jsx-runtime" @@ -32,7 +32,7 @@ describe('minify config', () => { return bar(); }; // normal comment - const Button = ()=>/*#__PURE__*/ (0,__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)('button', {}); + const Button = ()=>/*#__PURE__*/ jsx('button', {}); export { Button, foo }; " @@ -43,9 +43,9 @@ describe('minify config', () => { const fixturePath = join(__dirname, 'config/enabled'); const { entries } = await buildAndGetResults({ fixturePath }); expect(entries.esm).toMatchInlineSnapshot(` - "/*! For license information please see index.js.LICENSE.txt */ - import*as t from"react/jsx-runtime";/*! Legal Comment */let o=()=>{},r=()=>/*#__PURE__*/(0,t.jsx)("button",{});export{r as Button,o as foo};" - `); + "/*! For license information please see index.js.LICENSE.txt */ + import{jsx as t}from"react/jsx-runtime";/*! Legal Comment */let o=()=>{},r=()=>/*#__PURE__*/t("button",{});export{r as Button,o as foo};" + `); }); }); diff --git a/tests/integration/polyfill/index.test.ts b/tests/integration/polyfill/index.test.ts index 791c64b5d..0feca540e 100644 --- a/tests/integration/polyfill/index.test.ts +++ b/tests/integration/polyfill/index.test.ts @@ -13,7 +13,7 @@ describe('polyfill', async () => { test('should polyfill in ESM', async () => { expect(entries.esm0).not.toContain(globalPolyfillResult); expect(entries.esm0).toMatch( - /import \* as .* from "core-js-pure\/stable\/instance\/splice\.js"/, + /import .* from "core-js-pure\/stable\/instance\/splice\.js"/, ); const result = (await import(entryFiles.esm0!)).value; expect(result).toEqual(['1']); diff --git a/tests/integration/redirect/asset.test.ts b/tests/integration/redirect/asset.test.ts index 1a0974b54..150e60a1e 100644 --- a/tests/integration/redirect/asset.test.ts +++ b/tests/integration/redirect/asset.test.ts @@ -13,8 +13,7 @@ test('0. default', async () => { const { content: indexJs } = queryContent(contents.esm0!, /index\.js/); const { content: indexCjs } = queryContent(contents.cjs0!, /index\.cjs/); expect(indexJs).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE__assets_logo_js_450929b7__ from "./assets/logo.js"; - __WEBPACK_EXTERNAL_MODULE__assets_logo_js_450929b7__["default"]; + "import default_0 from "./assets/logo.js"; " `); expect(indexCjs).toContain('require("./assets/logo.cjs")'); @@ -24,8 +23,7 @@ test('1. redirect.asset = false', async () => { const { content: indexJs } = queryContent(contents.esm1!, /index\.js/); const { content: indexCjs } = queryContent(contents.cjs1!, /index\.cjs/); expect(indexJs).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE__assets_logo_svg_cfb3a4d9__ from "./assets/logo.svg"; - __WEBPACK_EXTERNAL_MODULE__assets_logo_svg_cfb3a4d9__["default"]; + "import default_0 from "./assets/logo.svg"; " `); expect(indexCjs).toContain('require("./assets/logo.svg")'); diff --git a/tests/integration/redirect/js.test.ts b/tests/integration/redirect/js.test.ts index 05304c408..23e4e90d2 100644 --- a/tests/integration/redirect/js.test.ts +++ b/tests/integration/redirect/js.test.ts @@ -20,12 +20,12 @@ 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_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"; - const src = __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 + typeof __WEBPACK_EXTERNAL_MODULE_prettier__["default"].version); + "import default_0 from "lodash"; + import default_1 from "prettier"; + import { bar } from "./bar/index.js"; + import { foo } from "./foo.js"; + import { baz } from "./baz.js"; + const src = default_0.toUpper(foo + bar + foo + bar + baz + typeof default_1.version); export { src as default }; " `); @@ -44,14 +44,14 @@ 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_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"; - const src = __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 + typeof __WEBPACK_EXTERNAL_MODULE_prettier__["default"].version); + "import default_0 from "lodash"; + import default_1 from "prettier"; + import { bar } from "@/bar"; + import { foo } from "@/foo"; + import { baz } from "~/baz"; + import { bar as bar_0 } from "./bar.js"; + import { foo as foo_0 } from "./foo.js"; + const src = default_0.toUpper(foo_0 + bar_0 + foo + bar + baz + typeof default_1.version); export { src as default }; " `); @@ -68,14 +68,14 @@ 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_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"; - const src = __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 + typeof __WEBPACK_EXTERNAL_MODULE_prettier__["default"].version); + "import default_0 from "lodash"; + import default_1 from "prettier"; + import { bar } from "./others/bar/index.js"; + import { foo } from "./others/foo.js"; + import { baz } from "./baz.js"; + import { bar as bar_0 } from "./bar/index.js"; + import { foo as foo_0 } from "./foo.js"; + const src = default_0.toUpper(foo_0 + bar_0 + foo + bar + baz + typeof default_1.version); export { src as default }; " `); @@ -100,14 +100,14 @@ 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_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"; - const src = __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 + typeof __WEBPACK_EXTERNAL_MODULE_prettier__["default"].version); + "import default_0 from "lodash"; + import default_1 from "prettier"; + import { bar } from "./others/bar/index.js"; + import { foo } from "./others/foo.js"; + import { baz } from "./baz.js"; + import { bar as bar_0 } from "./bar/index.js"; + import { foo as foo_0 } from "./foo.js"; + const src = default_0.toUpper(foo_0 + bar_0 + foo + bar + baz + typeof default_1.version); export { src as default }; " `); @@ -127,12 +127,12 @@ test('redirect.js.extension: false', async () => { /esm\/index\.js/, ); 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_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"; - const src = __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 + typeof __WEBPACK_EXTERNAL_MODULE_prettier__["default"].version); + "import default_0 from "lodash"; + import default_1 from "prettier"; + import { bar } from "./bar/index.ts"; + import { foo } from "./foo.ts"; + import { baz } from "./baz.ts"; + const src = default_0.toUpper(foo + bar + foo + bar + baz + typeof default_1.version); export { src as default }; " `); diff --git a/tests/integration/redirect/jsNotResolved.test.ts b/tests/integration/redirect/jsNotResolved.test.ts index 88713a519..2943c9075 100644 --- a/tests/integration/redirect/jsNotResolved.test.ts +++ b/tests/integration/redirect/jsNotResolved.test.ts @@ -13,11 +13,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_js_69b41beb__ from "./bar.js"; - import * as __WEBPACK_EXTERNAL_MODULE__foo_js_fdf5aa2d__ from "./foo.js"; - const src = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo_js_fdf5aa2d__["default"] + __WEBPACK_EXTERNAL_MODULE__bar_js_69b41beb__["default"] + typeof __WEBPACK_EXTERNAL_MODULE_prettier__["default"].version); + "import default_0 from "lodash"; + import default_1 from "prettier"; + import default_2 from "./bar.js"; + import default_3 from "./foo.js"; + const src = default_0.toUpper(default_3 + default_2 + typeof default_1.version); export { src as default }; " `); @@ -34,11 +34,11 @@ 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_69b41beb__ from "./bar.js"; - import * as __WEBPACK_EXTERNAL_MODULE__foo_js_fdf5aa2d__ from "./foo.js"; - const src = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo_js_fdf5aa2d__["default"] + __WEBPACK_EXTERNAL_MODULE__bar_js_69b41beb__["default"] + typeof __WEBPACK_EXTERNAL_MODULE_prettier__["default"].version); + "import default_0 from "lodash"; + import default_1 from "prettier"; + import default_2 from "./bar.js"; + import default_3 from "./foo.js"; + const src = default_0.toUpper(default_3 + default_2 + typeof default_1.version); export { src as default }; " `); @@ -55,11 +55,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_js_69b41beb__ from "./bar.js"; - import * as __WEBPACK_EXTERNAL_MODULE__foo_23da6eef__ from "./foo"; - const src = __WEBPACK_EXTERNAL_MODULE_lodash__["default"].toUpper(__WEBPACK_EXTERNAL_MODULE__foo_23da6eef__["default"] + __WEBPACK_EXTERNAL_MODULE__bar_js_69b41beb__["default"] + typeof __WEBPACK_EXTERNAL_MODULE_prettier__["default"].version); + "import default_0 from "lodash"; + import default_1 from "prettier"; + import default_2 from "./bar.js"; + import default_3 from "./foo"; + const src = default_0.toUpper(default_3 + default_2 + typeof default_1.version); export { src as default }; " `); diff --git a/tests/integration/redirect/style.test.ts b/tests/integration/redirect/style.test.ts index e862fc318..451d59b94 100644 --- a/tests/integration/redirect/style.test.ts +++ b/tests/integration/redirect/style.test.ts @@ -33,8 +33,7 @@ test('0. default', async () => { /cjs\/module\/index\.cjs/, ); expect(cssModuleIndexJs).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE__index_module_js_6796f91d__ from "./index.module.js"; - __WEBPACK_EXTERNAL_MODULE__index_module_js_6796f91d__["default"]; + "import default_0 from "./index.module.js"; " `); expect(cssModuleIndexCjs).toContain( @@ -66,8 +65,7 @@ test('1. style.path: false', () => { /cjs\/module\/index\.cjs/, ); expect(cssModuleIndexJs).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE__module_index_module_js_37f93df7__ from "@/module/index.module.js"; - __WEBPACK_EXTERNAL_MODULE__module_index_module_js_37f93df7__["default"]; + "import default_0 from "@/module/index.module.js"; " `); expect(cssModuleIndexCjs).toContain( @@ -99,8 +97,7 @@ test('2. style.extension: false', async () => { /cjs\/module\/index\.cjs/, ); expect(cssModuleIndexJs).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE__index_module_less_d1c6f702__ from "./index.module.less"; - __WEBPACK_EXTERNAL_MODULE__index_module_less_d1c6f702__["default"]; + "import default_0 from "./index.module.less"; " `); expect(cssModuleIndexCjs).toContain( @@ -132,8 +129,7 @@ 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_80aa7a8a__ from "@/module/index.module.less"; - __WEBPACK_EXTERNAL_MODULE__module_index_module_less_80aa7a8a__["default"]; + "import default_0 from "@/module/index.module.less"; " `); expect(cssModuleIndexCjs).toContain( diff --git a/tests/integration/require/index.test.ts b/tests/integration/require/index.test.ts index a74030375..87505548a 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_ab9f2194__ from "node:module"', - 'const _require = (0, __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__.createRequire)(import.meta.url)', + 'import { createRequire } from "node:module"', + 'const _require = createRequire(import.meta.url)', ]; const cjsStatements = [ @@ -47,8 +47,8 @@ test('require dynamic', async () => { ]; const esmStatements = [ - 'import * as __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__ from "node:module"', - 'const _require = (0, __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__.createRequire)(import.meta.url)', + 'import { createRequire } from "node:module"', + 'const _require = createRequire(import.meta.url)', ]; const cjsStatements = [ diff --git a/tests/integration/resolve/index.test.ts b/tests/integration/resolve/index.test.ts index 7a47576db..d9526de83 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_c5b9b54f__ from "node:path"; - const { join } = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"]; + "import default_0 from "node:path"; + const { join } = default_0; export { join }; " `); diff --git a/tests/integration/shims/index.test.ts b/tests/integration/shims/index.test.ts index 3acdb8451..070374c93 100644 --- a/tests/integration/shims/index.test.ts +++ b/tests/integration/shims/index.test.ts @@ -107,12 +107,12 @@ describe('CJS shims', () => { const fixturePath = join(__dirname, 'cjs'); const { entries } = await buildAndGetResults({ fixturePath }); expect(entries.esm).toMatchInlineSnapshot(` - "import * as __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__ from "node:module"; - import * as __WEBPACK_EXTERNAL_MODULE_url__ from "url"; + "import { createRequire } from "node:module"; + import { fileURLToPath } from "url"; const importMetaUrl = import.meta.url; - const src_require = (0, __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__.createRequire)(import.meta.url); + const src_require = createRequire(import.meta.url); const requiredModule = src_require('./ok.cjs'); - const src_filename = (0, __WEBPACK_EXTERNAL_MODULE_url__.fileURLToPath)(import.meta.url); + const src_filename = fileURLToPath(import.meta.url); console.log(src_filename); const src_module = null; export { src_filename as __filename, importMetaUrl, src_module as module, requiredModule }; diff --git a/tests/integration/style/stylus/index.test.ts b/tests/integration/style/stylus/index.test.ts index 44df1f97b..32c15b4ac 100644 --- a/tests/integration/style/stylus/index.test.ts +++ b/tests/integration/style/stylus/index.test.ts @@ -101,7 +101,7 @@ test('should extract css with pluginStylus in bundle-false', async () => { ); expectFileContainContent(jsContents.esm, 'index.js', [ 'import "./a.css"', - 'import * as __WEBPACK_EXTERNAL_MODULE__b_module_js_6a8a3e41__ from "./b.module.js"', + 'import default_0 from "./b.module.js', ]); expect(cjsCssFiles).toMatchInlineSnapshot(` diff --git a/tests/integration/transform-import/index.test.ts b/tests/integration/transform-import/index.test.ts index 790b70b1e..c470b390f 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_8d812d96__ from "@arco-design/web-react/es/button"' + ? 'import default_0 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_5fc72f99__ from "lodash/get"' + ? 'import default_1 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_73c13873__ from "lodash/fp/add"' + ? 'import default_0 from "lodash/fp/add"' : 'const add_namespaceObject = require("lodash/fp/add")', ); }