diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5932bfad7..8d181c8f6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -111,10 +111,10 @@ importers: devDependencies: '@module-federation/enhanced': specifier: ^0.18.2 - version: 0.18.2(@rspack/core@1.5.0-beta.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2) + version: 0.18.2(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2) '@module-federation/rsbuild-plugin': specifier: ^0.18.2 - version: 0.18.2(@rsbuild/core@1.4.15)(@rspack/core@1.5.0-beta.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2) + version: 0.18.2(@rsbuild/core@1.4.15)(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2) '@rsbuild/core': specifier: 1.4.15 version: 1.4.15 @@ -142,10 +142,10 @@ importers: devDependencies: '@module-federation/enhanced': specifier: ^0.18.2 - version: 0.18.2(@rspack/core@1.5.0-beta.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2) + version: 0.18.2(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2) '@module-federation/rsbuild-plugin': specifier: ^0.18.2 - version: 0.18.2(@rsbuild/core@1.4.15)(@rspack/core@1.5.0-beta.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2) + version: 0.18.2(@rsbuild/core@1.4.15)(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2) '@rsbuild/core': specifier: 1.4.15 version: 1.4.15 @@ -1200,15 +1200,6 @@ importers: specifier: 1.4.11 version: 1.4.11(@swc/helpers@0.5.17) - rspack/collect-typescript-info: - devDependencies: - '@rspack/cli': - specifier: 1.4.11 - version: 1.4.11(@rspack/core@1.4.11(@swc/helpers@0.5.17))(@types/express@5.0.3) - '@rspack/core': - specifier: 1.4.11 - version: 1.4.11(@swc/helpers@0.5.17) - rspack/common-libs/lib1: {} rspack/common-libs/lib2: {} @@ -1437,11 +1428,29 @@ importers: rspack/inline-const: devDependencies: '@rspack/cli': - specifier: 1.5.0-beta.0 - version: 1.5.0-beta.0(@rspack/core@1.5.0-beta.0(@swc/helpers@0.5.17))(@types/express@4.17.21)(webpack@5.101.2) + specifier: 1.5.0-rc.0 + version: 1.5.0-rc.0(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(@types/express@4.17.21)(webpack@5.101.2) '@rspack/core': - specifier: 1.5.0-beta.0 - version: 1.5.0-beta.0(@swc/helpers@0.5.17) + specifier: 1.5.0-rc.0 + version: 1.5.0-rc.0(@swc/helpers@0.5.17) + + rspack/inline-const-enum: + devDependencies: + '@rspack/cli': + specifier: 1.5.0-rc.0 + version: 1.5.0-rc.0(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(@types/express@4.17.21)(webpack@5.101.2) + '@rspack/core': + specifier: 1.5.0-rc.0 + version: 1.5.0-rc.0(@swc/helpers@0.5.17) + + rspack/inline-enum: + devDependencies: + '@rspack/cli': + specifier: 1.5.0-rc.0 + version: 1.5.0-rc.0(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(@types/express@4.17.21)(webpack@5.101.2) + '@rspack/core': + specifier: 1.5.0-rc.0 + version: 1.5.0-rc.0(@swc/helpers@0.5.17) rspack/javascript-api: devDependencies: @@ -2751,6 +2760,15 @@ importers: specifier: ^5.9.2 version: 5.9.2 + rspack/type-reexports-presence: + devDependencies: + '@rspack/cli': + specifier: 1.5.0-rc.0 + version: 1.5.0-rc.0(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(@types/express@4.17.21)(webpack@5.101.2) + '@rspack/core': + specifier: 1.5.0-rc.0 + version: 1.5.0-rc.0(@swc/helpers@0.5.17) + rspack/unplugin-auto-import: dependencies: vue: @@ -5201,6 +5219,9 @@ packages: '@module-federation/error-codes@0.17.1': resolution: {integrity: sha512-n6Elm4qKSjwAPxLUGtwnl7qt4y1dxB8OpSgVvXBIzqI9p27a3ZXshLPLnumlpPg1Qudaj8sLnSnFtt9yGpt5yQ==} + '@module-federation/error-codes@0.18.0': + resolution: {integrity: sha512-Woonm8ehyVIUPXChmbu80Zj6uJkC0dD9SJUZ/wOPtO8iiz/m+dkrOugAuKgoiR6qH4F+yorWila954tBz4uKsQ==} + '@module-federation/error-codes@0.18.2': resolution: {integrity: sha512-5240I1h/kMyU2N2ypg+CTJsqFk3micPm5JSZUdOV1eaqQCMqpOBAhWg0b/ZvsgB8tdaYi8cO2tXeSSn0tqI/uw==} @@ -5260,6 +5281,9 @@ packages: '@module-federation/runtime-core@0.17.1': resolution: {integrity: sha512-LCtIFuKgWPQ3E+13OyrVpuTPOWBMI/Ggwsq1Q874YeT8Px28b8tJRCj09DjyRFyhpSPyV/uG80T6iXPAUoLIfQ==} + '@module-federation/runtime-core@0.18.0': + resolution: {integrity: sha512-ZyYhrDyVAhUzriOsVfgL6vwd+5ebYm595Y13KeMf6TKDRoUHBMTLGQ8WM4TDj8JNsy7LigncK8C03fn97of0QQ==} + '@module-federation/runtime-core@0.18.2': resolution: {integrity: sha512-49OrCMUdPz0kqTdF8yvrVNt0hf9vkyVa33ZFZjjoKdeQ6SlBdZk+1WjmaLd2bngqX38j7XxJgHrIC0ApsOlOLQ==} @@ -5272,6 +5296,9 @@ packages: '@module-federation/runtime-tools@0.17.1': resolution: {integrity: sha512-4kr6zTFFwGywJx6whBtxsc84V+COAuuBpEdEbPZN//YLXhNB0iz2IGsy9r9wDl+06h84bD+3dQ05l9euRLgXzQ==} + '@module-federation/runtime-tools@0.18.0': + resolution: {integrity: sha512-fSga9o4t1UfXNV/Kh6qFvRyZpPp3EHSPRISNeyT8ZoTpzDNiYzhtw0BPUSSD8m6C6XQh2s/11rI4g80UY+d+hA==} + '@module-federation/runtime-tools@0.18.2': resolution: {integrity: sha512-T/WlYio0qhWOwAF3oJWXZf0Pksk8r0PChHeVtEpTXjfOpax1/1cijPQdfnigan8MgZgatOlmmfGMRa7u3kt7/A==} @@ -5284,6 +5311,9 @@ packages: '@module-federation/runtime@0.17.1': resolution: {integrity: sha512-vKEN32MvUbpeuB/s6UXfkHDZ9N5jFyDDJnj83UTJ8n4N1jHIJu9VZ6Yi4/Ac8cfdvU8UIK9bIbfVXWbUYZUDsw==} + '@module-federation/runtime@0.18.0': + resolution: {integrity: sha512-+C4YtoSztM7nHwNyZl6dQKGUVJdsPrUdaf3HIKReg/GQbrt9uvOlUWo2NXMZ8vDAnf/QRrpSYAwXHmWDn9Obaw==} + '@module-federation/runtime@0.18.2': resolution: {integrity: sha512-ZtBQcyQ7Hi1RqEwJV+AIjlZPmwW+4xQU41GMbTfJDDl+Wms+YtfM904vuWDe1cbwJ94JJ5I6hyX7dyPmPqk8NA==} @@ -5296,6 +5326,9 @@ packages: '@module-federation/sdk@0.17.1': resolution: {integrity: sha512-nlUcN6UTEi+3HWF+k8wPy7gH0yUOmCT+xNatihkIVR9REAnr7BUvHFGlPJmx7WEbLPL46+zJUbtQHvLzXwFhng==} + '@module-federation/sdk@0.18.0': + resolution: {integrity: sha512-Lo/Feq73tO2unjmpRfyyoUkTVoejhItXOk/h5C+4cistnHbTV8XHrW/13fD5e1Iu60heVdAhhelJd6F898Ve9A==} + '@module-federation/sdk@0.18.2': resolution: {integrity: sha512-sfvC43L1nA4U5HHQsLXeEenuE/0AMgHOEzHCICNZYvxvtHz3Pau6NK4hcQR5hGGpuIPweQilbQ0oAN8ZryvLdw==} @@ -5311,6 +5344,9 @@ packages: '@module-federation/webpack-bundler-runtime@0.17.1': resolution: {integrity: sha512-Swspdgf4PzcbvS9SNKFlBzfq8h/Qxwqjq/xRSqw1pqAZWondZQzwTTqPXhgrg0bFlz7qWjBS/6a8KuH/gRvGaQ==} + '@module-federation/webpack-bundler-runtime@0.18.0': + resolution: {integrity: sha512-TEvErbF+YQ+6IFimhUYKK3a5wapD90d90sLsNpcu2kB3QGT7t4nIluE25duXuZDVUKLz86tEPrza/oaaCWTpvQ==} + '@module-federation/webpack-bundler-runtime@0.18.2': resolution: {integrity: sha512-o+enMUcLZzED+C2+g2KflEevzvuw2U90t+kJmJ0zq4RmqDVy3dFVY1Tr/+gY9bwpccvaw8g+j8nRyEDoYjG6fg==} @@ -6028,8 +6064,8 @@ packages: cpu: [arm64] os: [darwin] - '@rspack/binding-darwin-arm64@1.5.0-beta.0': - resolution: {integrity: sha512-P9m+DAZXulV6pgAmtdLubANCx4f/y6UJrNWy6sLFnVfSXAVbGvchoBcgb9LvyiNcVyVq8GZyGT8tggpi9lbhLA==} + '@rspack/binding-darwin-arm64@1.5.0-rc.0': + resolution: {integrity: sha512-7ss68H8xIRaijUnT46S8X7L+/2+bBDyDTx/KzM6PEi9TtRNvx/XdiFf87lz1LPWduEes5oB2syhLQ9lk6mAIMA==} cpu: [arm64] os: [darwin] @@ -6048,8 +6084,8 @@ packages: cpu: [x64] os: [darwin] - '@rspack/binding-darwin-x64@1.5.0-beta.0': - resolution: {integrity: sha512-I8XHkeK+fRGdQMXnrirZXLRKfqnN52C57zKhlY2/TxTW+4gVb8tqLD0gTrGDqUTlXACHjnhx3uwJ8XkyUlgFLw==} + '@rspack/binding-darwin-x64@1.5.0-rc.0': + resolution: {integrity: sha512-XIQbFq0cpX8ujQmWWMc8QqSxInRCTb1N2VzLtUuQDOeo8SLQQajVQDSLXPje48SpEU0BmqcvZzXEfLp1hOuM/g==} cpu: [x64] os: [darwin] @@ -6068,8 +6104,8 @@ packages: cpu: [arm64] os: [linux] - '@rspack/binding-linux-arm64-gnu@1.5.0-beta.0': - resolution: {integrity: sha512-6fotqE8ZXE4rvywS4wCuwNwd6XprzJxEZGhEW/MqGV2ut9L7oLCI071Cz/v3pBXBJTcuh0vDuwH4xQ2uCO8SnA==} + '@rspack/binding-linux-arm64-gnu@1.5.0-rc.0': + resolution: {integrity: sha512-1h9+MirXyh7FAf41VQAzbPRpRgPbAqU7Eog/lpIUokBZEaiNhIWGdIQDztgAwte0K802GUnF6w45PC3lq4UIjg==} cpu: [arm64] os: [linux] @@ -6088,8 +6124,8 @@ packages: cpu: [arm64] os: [linux] - '@rspack/binding-linux-arm64-musl@1.5.0-beta.0': - resolution: {integrity: sha512-5u34Y3mIaqV8OPc1ojFTik+3spzRi+72/0IUgdjNfZEBSkqBHQJG/Pib5CIe6161yGNl/FF11KH/3DlK0uxaPA==} + '@rspack/binding-linux-arm64-musl@1.5.0-rc.0': + resolution: {integrity: sha512-rpP/MUOXqRLemSb41S6plYConjcTdBcgytPVbWGAXayE/5ez/tFSm8VK8uGtF2A6DLL+NS5twhDyig3ZgSK51g==} cpu: [arm64] os: [linux] @@ -6108,8 +6144,8 @@ packages: cpu: [x64] os: [linux] - '@rspack/binding-linux-x64-gnu@1.5.0-beta.0': - resolution: {integrity: sha512-lV6Ni73T+0owXi56iSgEiRQcqczvm3UNHC8vfhTXJE6gyh+72t9jL6AoEfEm2vlxwZyAW2etQrplci6leshKBw==} + '@rspack/binding-linux-x64-gnu@1.5.0-rc.0': + resolution: {integrity: sha512-i5VPlG+2NNqTBBGiQ7LEesxGroMe4/sSTcKge2lm0D3/GBrFrfcrghesxeDYGnuRXePXYbXfmIlcd2G4Lj9dPw==} cpu: [x64] os: [linux] @@ -6128,8 +6164,8 @@ packages: cpu: [x64] os: [linux] - '@rspack/binding-linux-x64-musl@1.5.0-beta.0': - resolution: {integrity: sha512-T9ik/8Eu2br8sOftAOXbMvgrBLZeiev9o/XnQw+MygnA4wczlSfWF22eJwlhssk4y5H1MPlkE8QMVBRIJrwrDw==} + '@rspack/binding-linux-x64-musl@1.5.0-rc.0': + resolution: {integrity: sha512-2s7kF1qj/2wYO1pKSFi3KHId3Kw4wngnk+Z8cvbibLueZoVvLoh7kPbzVvI2itzCzhqOJsnZN941jKmzXUVBIw==} cpu: [x64] os: [linux] @@ -6141,8 +6177,8 @@ packages: resolution: {integrity: sha512-LRyln0jg2FblwFQg+0lPVc/bvDeo3A3EVWQtsTtOwjb4cjAG/Zqo5Q0VobaJTKgBOF9eAHTo9IL92SSj433+Eg==} cpu: [wasm32] - '@rspack/binding-wasm32-wasi@1.5.0-beta.0': - resolution: {integrity: sha512-7wCc99kG6hWGt1hs4vrJbPK7GD2diHmoae4lBY7kcNaoP0ZpTKiICG+yCrTHmSyNlU6wbxsXGdJAabX6h4Brig==} + '@rspack/binding-wasm32-wasi@1.5.0-rc.0': + resolution: {integrity: sha512-y7WOXw4rOwlYX2QXry+nLTqxNOGYvQguRu/1e7id3CzoYNGRzkRfqP4ETJElLCOoBG38U823dQlpX5QFcf8C7A==} cpu: [wasm32] '@rspack/binding-win32-arm64-msvc@1.3.12': @@ -6160,8 +6196,8 @@ packages: cpu: [arm64] os: [win32] - '@rspack/binding-win32-arm64-msvc@1.5.0-beta.0': - resolution: {integrity: sha512-3A3cN7wno4vY09NH/wrA0tzYRsv+Q1Kv5p/kXrnFLeQ8ZJ1MFyN8AFHt3UW9FO6TniJrxxJPmYd7D2szNeXujw==} + '@rspack/binding-win32-arm64-msvc@1.5.0-rc.0': + resolution: {integrity: sha512-hO9lG/ROprhFMBgP3E+wEmMp9IzRSh68smB8nvZvqgFUiObuDlkG7XndfBaoSZl0TBYhFyN2iRUoYJKxBx9oNA==} cpu: [arm64] os: [win32] @@ -6180,8 +6216,8 @@ packages: cpu: [ia32] os: [win32] - '@rspack/binding-win32-ia32-msvc@1.5.0-beta.0': - resolution: {integrity: sha512-0QFpKQiH+MdyR4ILA6PP074YVkLhfVAakPLUe3UTOuBRXnN/C/i7Xop+6raWqrMmxU2qzgFi5N2zf0plYPbvnw==} + '@rspack/binding-win32-ia32-msvc@1.5.0-rc.0': + resolution: {integrity: sha512-FbkAd7JyBKNuyTISBmmNUwRyE/8G49DJ+VN5SqHOxmKDS31cfM+lFXH5vBEGduWnMmp0lxran+THzvK2yKzvlg==} cpu: [ia32] os: [win32] @@ -6200,8 +6236,8 @@ packages: cpu: [x64] os: [win32] - '@rspack/binding-win32-x64-msvc@1.5.0-beta.0': - resolution: {integrity: sha512-99pXkrDCmuFe8B2AuPa4g/tu+A+GYQ2VcxOvbOrw5N4Y5ANhQJYGhxxYyZ7ijS7zyXP8SJ7PTf1mMeM8ghIzmQ==} + '@rspack/binding-win32-x64-msvc@1.5.0-rc.0': + resolution: {integrity: sha512-nq5uqMYffIu9ZSq2uVq6/dj15HO0dXn8W4hFWxR84KqlI7/7PpzpZYxMn2UkU1IOVP2gfHa9dIJ+EyHrkHlcdQ==} cpu: [x64] os: [win32] @@ -6214,8 +6250,8 @@ packages: '@rspack/binding@1.4.5': resolution: {integrity: sha512-hO7DrZMMOyzwK7EEYfHMJmWhsNjeYLr39pEnXOWeuCCcwus6e/QNSSf2m/2mSFf0JeINwQqHkA1JvJEZ5JSj6g==} - '@rspack/binding@1.5.0-beta.0': - resolution: {integrity: sha512-MzzSb/Ruq2fPBUfuhbezhD4V7Pg28n3otRZ7uNmeWfpvce3FtsJyyds92r99+rxwlb0Md31Zdj/NLJtpyFWBLA==} + '@rspack/binding@1.5.0-rc.0': + resolution: {integrity: sha512-WOtLGRdlEE07F1GzgehoC7VxqUwyphIi/IEgxg7mROvQ7UUNpfe5eZVbJTeF2Y4pIFK7GnGwplIw9kLMssi2Ew==} '@rspack/cli@1.4.11': resolution: {integrity: sha512-21/EF/gdtTt03LYtXDFFE9rJNUfpxMtIszGgjfULal3IgYHAjo7mKPp6QlPQLSMi/26+TYHa9WZUrnHf8GUIJg==} @@ -6223,8 +6259,8 @@ packages: peerDependencies: '@rspack/core': ^1.0.0-alpha || ^1.x - '@rspack/cli@1.5.0-beta.0': - resolution: {integrity: sha512-PHbbiss3/AQ0R7kdxi8kU0EFxoLjVkiU768pKkLvSo7tfZa6KbOIFJZF1qhbCktyOu6J88lEqdQl68CMbSVilg==} + '@rspack/cli@1.5.0-rc.0': + resolution: {integrity: sha512-oGSscjCwHJHMVtXnG1N1odwzJFRdHwHlur25nTa5YY9EzyZSl8xOLtz3RYMLXHdoG3LvbbuQia8gjGx9Z7wP6A==} hasBin: true peerDependencies: '@rspack/core': ^1.0.0-alpha || ^1.x @@ -6256,8 +6292,8 @@ packages: '@swc/helpers': optional: true - '@rspack/core@1.5.0-beta.0': - resolution: {integrity: sha512-9Vlk2Na6p4EEvBTXp8SFWC8T7CeQ8vGV+fvtvtK4xLuqutHZ7UDifaIVybJ44/Oi4AFQpJeBiBr5u8/JSsa2pQ==} + '@rspack/core@1.5.0-rc.0': + resolution: {integrity: sha512-CicQS2K692yawVCdQOrwM2B0jO0A5sQRAq/WWMk8goCGCHmSLsGNz35FdvsuCN2k54FXpSfjnFaK3xPIQOWk7A==} engines: {node: '>=18.12.0'} peerDependencies: '@swc/helpers': '>=0.5.1' @@ -6265,12 +6301,6 @@ packages: '@swc/helpers': optional: true - '@rspack/dev-server@1.1.3': - resolution: {integrity: sha512-jWPeyiZiGpbLYGhwHvwxhaa4rsr8CQvsWkWslqeMLb2uXwmyy3UWjUR1q+AhAPnf0gs3lZoFZ1hjBQVecHKUvg==} - engines: {node: '>= 18.12.0'} - peerDependencies: - '@rspack/core': '*' - '@rspack/dev-server@1.1.4': resolution: {integrity: sha512-kGHYX2jYf3ZiHwVl0aUEPBOBEIG1aWleCDCAi+Jg32KUu3qr/zDUpCEd0wPuHfLEgk0X0xAEYCS6JMO7nBStNQ==} engines: {node: '>= 18.12.0'} @@ -12061,6 +12091,10 @@ packages: resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} + pirates@4.0.7: + resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} + engines: {node: '>= 6'} + pkg-dir@4.2.0: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} engines: {node: '>=8'} @@ -17655,7 +17689,7 @@ snapshots: - supports-color - utf-8-validate - '@module-federation/enhanced@0.18.2(@rspack/core@1.5.0-beta.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2)': + '@module-federation/enhanced@0.18.2(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2)': dependencies: '@module-federation/bridge-react-webpack-plugin': 0.18.2 '@module-federation/cli': 0.18.2(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2)) @@ -17665,7 +17699,7 @@ snapshots: '@module-federation/inject-external-runtime-core-plugin': 0.18.2(@module-federation/runtime-tools@0.18.2) '@module-federation/managers': 0.18.2 '@module-federation/manifest': 0.18.2(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2)) - '@module-federation/rspack': 0.18.2(@rspack/core@1.5.0-beta.0(@swc/helpers@0.5.17))(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2)) + '@module-federation/rspack': 0.18.2(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2)) '@module-federation/runtime-tools': 0.18.2 '@module-federation/sdk': 0.18.2 btoa: 1.2.1 @@ -17690,6 +17724,8 @@ snapshots: '@module-federation/error-codes@0.17.1': {} + '@module-federation/error-codes@0.18.0': {} + '@module-federation/error-codes@0.18.2': {} '@module-federation/inject-external-runtime-core-plugin@0.18.2(@module-federation/runtime-tools@0.18.2)': @@ -17717,9 +17753,9 @@ snapshots: - utf-8-validate - vue-tsc - '@module-federation/node@2.7.13(@rspack/core@1.5.0-beta.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2)': + '@module-federation/node@2.7.13(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2)': dependencies: - '@module-federation/enhanced': 0.18.2(@rspack/core@1.5.0-beta.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2) + '@module-federation/enhanced': 0.18.2(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2) '@module-federation/runtime': 0.18.2 '@module-federation/sdk': 0.18.2 btoa: 1.2.1 @@ -17738,10 +17774,10 @@ snapshots: - utf-8-validate - vue-tsc - '@module-federation/rsbuild-plugin@0.18.2(@rsbuild/core@1.4.15)(@rspack/core@1.5.0-beta.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2)': + '@module-federation/rsbuild-plugin@0.18.2(@rsbuild/core@1.4.15)(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2)': dependencies: - '@module-federation/enhanced': 0.18.2(@rspack/core@1.5.0-beta.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2) - '@module-federation/node': 2.7.13(@rspack/core@1.5.0-beta.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2) + '@module-federation/enhanced': 0.18.2(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2) + '@module-federation/node': 2.7.13(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))(webpack@5.101.2) '@module-federation/sdk': 0.18.2 fs-extra: 11.3.0 optionalDependencies: @@ -17759,7 +17795,7 @@ snapshots: - vue-tsc - webpack - '@module-federation/rspack@0.18.2(@rspack/core@1.5.0-beta.0(@swc/helpers@0.5.17))(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))': + '@module-federation/rspack@0.18.2(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2))': dependencies: '@module-federation/bridge-react-webpack-plugin': 0.18.2 '@module-federation/dts-plugin': 0.18.2(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2)) @@ -17768,7 +17804,7 @@ snapshots: '@module-federation/manifest': 0.18.2(typescript@5.9.2)(vue-tsc@1.8.27(typescript@5.9.2)) '@module-federation/runtime-tools': 0.18.2 '@module-federation/sdk': 0.18.2 - '@rspack/core': 1.5.0-beta.0(@swc/helpers@0.5.17) + '@rspack/core': 1.5.0-rc.0(@swc/helpers@0.5.17) btoa: 1.2.1 optionalDependencies: typescript: 5.9.2 @@ -17794,6 +17830,11 @@ snapshots: '@module-federation/error-codes': 0.17.1 '@module-federation/sdk': 0.17.1 + '@module-federation/runtime-core@0.18.0': + dependencies: + '@module-federation/error-codes': 0.18.0 + '@module-federation/sdk': 0.18.0 + '@module-federation/runtime-core@0.18.2': dependencies: '@module-federation/error-codes': 0.18.2 @@ -17814,6 +17855,11 @@ snapshots: '@module-federation/runtime': 0.17.1 '@module-federation/webpack-bundler-runtime': 0.17.1 + '@module-federation/runtime-tools@0.18.0': + dependencies: + '@module-federation/runtime': 0.18.0 + '@module-federation/webpack-bundler-runtime': 0.18.0 + '@module-federation/runtime-tools@0.18.2': dependencies: '@module-federation/runtime': 0.18.2 @@ -17837,6 +17883,12 @@ snapshots: '@module-federation/runtime-core': 0.17.1 '@module-federation/sdk': 0.17.1 + '@module-federation/runtime@0.18.0': + dependencies: + '@module-federation/error-codes': 0.18.0 + '@module-federation/runtime-core': 0.18.0 + '@module-federation/sdk': 0.18.0 + '@module-federation/runtime@0.18.2': dependencies: '@module-federation/error-codes': 0.18.2 @@ -17849,6 +17901,8 @@ snapshots: '@module-federation/sdk@0.17.1': {} + '@module-federation/sdk@0.18.0': {} + '@module-federation/sdk@0.18.2': {} '@module-federation/third-party-dts-extractor@0.18.2': @@ -17872,6 +17926,11 @@ snapshots: '@module-federation/runtime': 0.17.1 '@module-federation/sdk': 0.17.1 + '@module-federation/webpack-bundler-runtime@0.18.0': + dependencies: + '@module-federation/runtime': 0.18.0 + '@module-federation/sdk': 0.18.0 + '@module-federation/webpack-bundler-runtime@0.18.2': dependencies: '@module-federation/runtime': 0.18.2 @@ -18715,7 +18774,7 @@ snapshots: '@rspack/binding-darwin-arm64@1.4.5': optional: true - '@rspack/binding-darwin-arm64@1.5.0-beta.0': + '@rspack/binding-darwin-arm64@1.5.0-rc.0': optional: true '@rspack/binding-darwin-x64@1.3.12': @@ -18727,7 +18786,7 @@ snapshots: '@rspack/binding-darwin-x64@1.4.5': optional: true - '@rspack/binding-darwin-x64@1.5.0-beta.0': + '@rspack/binding-darwin-x64@1.5.0-rc.0': optional: true '@rspack/binding-linux-arm64-gnu@1.3.12': @@ -18739,7 +18798,7 @@ snapshots: '@rspack/binding-linux-arm64-gnu@1.4.5': optional: true - '@rspack/binding-linux-arm64-gnu@1.5.0-beta.0': + '@rspack/binding-linux-arm64-gnu@1.5.0-rc.0': optional: true '@rspack/binding-linux-arm64-musl@1.3.12': @@ -18751,7 +18810,7 @@ snapshots: '@rspack/binding-linux-arm64-musl@1.4.5': optional: true - '@rspack/binding-linux-arm64-musl@1.5.0-beta.0': + '@rspack/binding-linux-arm64-musl@1.5.0-rc.0': optional: true '@rspack/binding-linux-x64-gnu@1.3.12': @@ -18763,7 +18822,7 @@ snapshots: '@rspack/binding-linux-x64-gnu@1.4.5': optional: true - '@rspack/binding-linux-x64-gnu@1.5.0-beta.0': + '@rspack/binding-linux-x64-gnu@1.5.0-rc.0': optional: true '@rspack/binding-linux-x64-musl@1.3.12': @@ -18775,7 +18834,7 @@ snapshots: '@rspack/binding-linux-x64-musl@1.4.5': optional: true - '@rspack/binding-linux-x64-musl@1.5.0-beta.0': + '@rspack/binding-linux-x64-musl@1.5.0-rc.0': optional: true '@rspack/binding-wasm32-wasi@1.4.11': @@ -18788,7 +18847,7 @@ snapshots: '@napi-rs/wasm-runtime': 0.2.11 optional: true - '@rspack/binding-wasm32-wasi@1.5.0-beta.0': + '@rspack/binding-wasm32-wasi@1.5.0-rc.0': dependencies: '@napi-rs/wasm-runtime': 1.0.1 optional: true @@ -18802,7 +18861,7 @@ snapshots: '@rspack/binding-win32-arm64-msvc@1.4.5': optional: true - '@rspack/binding-win32-arm64-msvc@1.5.0-beta.0': + '@rspack/binding-win32-arm64-msvc@1.5.0-rc.0': optional: true '@rspack/binding-win32-ia32-msvc@1.3.12': @@ -18814,7 +18873,7 @@ snapshots: '@rspack/binding-win32-ia32-msvc@1.4.5': optional: true - '@rspack/binding-win32-ia32-msvc@1.5.0-beta.0': + '@rspack/binding-win32-ia32-msvc@1.5.0-rc.0': optional: true '@rspack/binding-win32-x64-msvc@1.3.12': @@ -18826,7 +18885,7 @@ snapshots: '@rspack/binding-win32-x64-msvc@1.4.5': optional: true - '@rspack/binding-win32-x64-msvc@1.5.0-beta.0': + '@rspack/binding-win32-x64-msvc@1.5.0-rc.0': optional: true '@rspack/binding@1.3.12': @@ -18867,18 +18926,18 @@ snapshots: '@rspack/binding-win32-ia32-msvc': 1.4.5 '@rspack/binding-win32-x64-msvc': 1.4.5 - '@rspack/binding@1.5.0-beta.0': + '@rspack/binding@1.5.0-rc.0': optionalDependencies: - '@rspack/binding-darwin-arm64': 1.5.0-beta.0 - '@rspack/binding-darwin-x64': 1.5.0-beta.0 - '@rspack/binding-linux-arm64-gnu': 1.5.0-beta.0 - '@rspack/binding-linux-arm64-musl': 1.5.0-beta.0 - '@rspack/binding-linux-x64-gnu': 1.5.0-beta.0 - '@rspack/binding-linux-x64-musl': 1.5.0-beta.0 - '@rspack/binding-wasm32-wasi': 1.5.0-beta.0 - '@rspack/binding-win32-arm64-msvc': 1.5.0-beta.0 - '@rspack/binding-win32-ia32-msvc': 1.5.0-beta.0 - '@rspack/binding-win32-x64-msvc': 1.5.0-beta.0 + '@rspack/binding-darwin-arm64': 1.5.0-rc.0 + '@rspack/binding-darwin-x64': 1.5.0-rc.0 + '@rspack/binding-linux-arm64-gnu': 1.5.0-rc.0 + '@rspack/binding-linux-arm64-musl': 1.5.0-rc.0 + '@rspack/binding-linux-x64-gnu': 1.5.0-rc.0 + '@rspack/binding-linux-x64-musl': 1.5.0-rc.0 + '@rspack/binding-wasm32-wasi': 1.5.0-rc.0 + '@rspack/binding-win32-arm64-msvc': 1.5.0-rc.0 + '@rspack/binding-win32-ia32-msvc': 1.5.0-rc.0 + '@rspack/binding-win32-x64-msvc': 1.5.0-rc.0 '@rspack/cli@1.4.11(@rspack/core@1.4.11(@swc/helpers@0.5.17))(@types/express@5.0.3)': dependencies: @@ -18940,15 +18999,14 @@ snapshots: - webpack - webpack-cli - '@rspack/cli@1.5.0-beta.0(@rspack/core@1.5.0-beta.0(@swc/helpers@0.5.17))(@types/express@4.17.21)(webpack@5.101.2)': + '@rspack/cli@1.5.0-rc.0(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(@types/express@4.17.21)(webpack@5.101.2)': dependencies: '@discoveryjs/json-ext': 0.5.7 - '@rspack/core': 1.5.0-beta.0(@swc/helpers@0.5.17) - '@rspack/dev-server': 1.1.3(@rspack/core@1.5.0-beta.0(@swc/helpers@0.5.17))(@types/express@4.17.21)(webpack@5.101.2) + '@rspack/core': 1.5.0-rc.0(@swc/helpers@0.5.17) + '@rspack/dev-server': 1.1.4(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(@types/express@4.17.21)(webpack@5.101.2) colorette: 2.0.20 exit-hook: 4.0.0 - interpret: 3.1.1 - rechoir: 0.8.0 + pirates: 4.0.7 webpack-bundle-analyzer: 4.10.2 yargs: 17.7.2 transitivePeerDependencies: @@ -18985,17 +19043,17 @@ snapshots: optionalDependencies: '@swc/helpers': 0.5.17 - '@rspack/core@1.5.0-beta.0(@swc/helpers@0.5.17)': + '@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17)': dependencies: - '@module-federation/runtime-tools': 0.17.1 - '@rspack/binding': 1.5.0-beta.0 + '@module-federation/runtime-tools': 0.18.0 + '@rspack/binding': 1.5.0-rc.0 '@rspack/lite-tapable': 1.0.1 optionalDependencies: '@swc/helpers': 0.5.17 - '@rspack/dev-server@1.1.3(@rspack/core@1.5.0-beta.0(@swc/helpers@0.5.17))(@types/express@4.17.21)(webpack@5.101.2)': + '@rspack/dev-server@1.1.4(@rspack/core@1.4.11(@swc/helpers@0.5.17))(@types/express@4.17.21)(webpack@5.101.2)': dependencies: - '@rspack/core': 1.5.0-beta.0(@swc/helpers@0.5.17) + '@rspack/core': 1.4.11(@swc/helpers@0.5.17) chokidar: 3.6.0 http-proxy-middleware: 2.0.9(@types/express@4.17.21) p-retry: 6.2.0 @@ -19010,13 +19068,13 @@ snapshots: - webpack - webpack-cli - '@rspack/dev-server@1.1.4(@rspack/core@1.4.11(@swc/helpers@0.5.17))(@types/express@4.17.21)(webpack@5.101.2)': + '@rspack/dev-server@1.1.4(@rspack/core@1.4.11(@swc/helpers@0.5.17))(@types/express@5.0.3)': dependencies: '@rspack/core': 1.4.11(@swc/helpers@0.5.17) chokidar: 3.6.0 - http-proxy-middleware: 2.0.9(@types/express@4.17.21) + http-proxy-middleware: 2.0.9(@types/express@5.0.3) p-retry: 6.2.0 - webpack-dev-server: 5.2.2(webpack-cli@5.1.4)(webpack@5.101.2) + webpack-dev-server: 5.2.2(webpack@5.101.2(@swc/core@1.13.3(@swc/helpers@0.5.17))) ws: 8.18.0 transitivePeerDependencies: - '@types/express' @@ -19027,13 +19085,13 @@ snapshots: - webpack - webpack-cli - '@rspack/dev-server@1.1.4(@rspack/core@1.4.11(@swc/helpers@0.5.17))(@types/express@5.0.3)': + '@rspack/dev-server@1.1.4(@rspack/core@1.4.11(@swc/helpers@0.5.17))(webpack-cli@5.1.4)(webpack@5.101.2)': dependencies: '@rspack/core': 1.4.11(@swc/helpers@0.5.17) chokidar: 3.6.0 http-proxy-middleware: 2.0.9(@types/express@5.0.3) p-retry: 6.2.0 - webpack-dev-server: 5.2.2(webpack@5.101.2(@swc/core@1.13.3(@swc/helpers@0.5.17))) + webpack-dev-server: 5.2.2(webpack-cli@5.1.4)(webpack@5.101.2) ws: 8.18.0 transitivePeerDependencies: - '@types/express' @@ -19044,13 +19102,13 @@ snapshots: - webpack - webpack-cli - '@rspack/dev-server@1.1.4(@rspack/core@1.4.11(@swc/helpers@0.5.17))(webpack-cli@5.1.4)(webpack@5.101.2)': + '@rspack/dev-server@1.1.4(@rspack/core@1.4.11(@swc/helpers@0.5.17))(webpack@5.101.2(@swc/core@1.13.3(@swc/helpers@0.5.17)))': dependencies: '@rspack/core': 1.4.11(@swc/helpers@0.5.17) chokidar: 3.6.0 http-proxy-middleware: 2.0.9(@types/express@5.0.3) p-retry: 6.2.0 - webpack-dev-server: 5.2.2(webpack-cli@5.1.4)(webpack@5.101.2) + webpack-dev-server: 5.2.2(webpack@5.101.2(@swc/core@1.13.3(@swc/helpers@0.5.17))) ws: 8.18.0 transitivePeerDependencies: - '@types/express' @@ -19061,13 +19119,13 @@ snapshots: - webpack - webpack-cli - '@rspack/dev-server@1.1.4(@rspack/core@1.4.11(@swc/helpers@0.5.17))(webpack@5.101.2(@swc/core@1.13.3(@swc/helpers@0.5.17)))': + '@rspack/dev-server@1.1.4(@rspack/core@1.5.0-rc.0(@swc/helpers@0.5.17))(@types/express@4.17.21)(webpack@5.101.2)': dependencies: - '@rspack/core': 1.4.11(@swc/helpers@0.5.17) + '@rspack/core': 1.5.0-rc.0(@swc/helpers@0.5.17) chokidar: 3.6.0 - http-proxy-middleware: 2.0.9(@types/express@5.0.3) + http-proxy-middleware: 2.0.9(@types/express@4.17.21) p-retry: 6.2.0 - webpack-dev-server: 5.2.2(webpack@5.101.2(@swc/core@1.13.3(@swc/helpers@0.5.17))) + webpack-dev-server: 5.2.2(webpack-cli@5.1.4)(webpack@5.101.2) ws: 8.18.0 transitivePeerDependencies: - '@types/express' @@ -26389,6 +26447,8 @@ snapshots: pirates@4.0.6: {} + pirates@4.0.7: {} + pkg-dir@4.2.0: dependencies: find-up: 4.1.0 diff --git a/rspack/collect-typescript-info/src/index.ts b/rspack/collect-typescript-info/src/index.ts deleted file mode 100644 index f47ceeeff..000000000 --- a/rspack/collect-typescript-info/src/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Kind, TypeA, TypeB } from './reexports'; - -const a: TypeA = 42; -const b: TypeB = 'rspack'; - -console.log(a, b); - -// Take a look at the build output (dist/main.js) -// Should inline Kind.A to 0 and Kind.B to 1 here since we configured inlineEnum -console.log(Kind.A, Kind.B); diff --git a/rspack/collect-typescript-info/package.json b/rspack/inline-const-enum/package.json similarity index 75% rename from rspack/collect-typescript-info/package.json rename to rspack/inline-const-enum/package.json index 2d83f4ad3..4d173fbef 100644 --- a/rspack/collect-typescript-info/package.json +++ b/rspack/inline-const-enum/package.json @@ -8,7 +8,7 @@ "build": "rspack build" }, "devDependencies": { - "@rspack/cli": "1.4.11", - "@rspack/core": "1.4.11" + "@rspack/cli": "1.5.0-rc.0", + "@rspack/core": "1.5.0-rc.0" } } diff --git a/rspack/inline-const-enum/rspack.config.mjs b/rspack/inline-const-enum/rspack.config.mjs new file mode 100644 index 000000000..242c73b20 --- /dev/null +++ b/rspack/inline-const-enum/rspack.config.mjs @@ -0,0 +1,46 @@ +// @ts-check + +/** @type {import("@rspack/core").Configuration} */ +export default { + entry: { + main: "./src/index.ts", + }, + experiments: { + inlineEnum: true, + }, + mode: "production", + optimization: { + // disable minimize so you can understand the output + minimize: false, + }, + resolve: { + extensions: [".ts", "..."], + }, + module: { + rules: [ + { + test: /\.ts$/, + use: { + loader: "builtin:swc-loader", + /** @type {import("@rspack/core").SwcLoaderOptions} */ + options: { + jsc: { + parser: { + syntax: "typescript", + }, + transform: { + tsEnumIsMutable: true, + } + }, + rspackExperiments: { + collectTypeScriptInfo: { + exportedEnum: 'const-only', + } + } + }, + }, + type: "javascript/auto", + }, + ], + }, +}; diff --git a/rspack/inline-const-enum/src/enums.ts b/rspack/inline-const-enum/src/enums.ts new file mode 100644 index 000000000..494cb60ea --- /dev/null +++ b/rspack/inline-const-enum/src/enums.ts @@ -0,0 +1,9 @@ +export enum Kind { + A, + B, +} + +export const enum ConstKind { + A, + B, +} diff --git a/rspack/inline-const-enum/src/index.ts b/rspack/inline-const-enum/src/index.ts new file mode 100644 index 000000000..abaf3fe31 --- /dev/null +++ b/rspack/inline-const-enum/src/index.ts @@ -0,0 +1,7 @@ +import { Kind, ConstKind } from './enums'; + +// Take a look at the build output (dist/main.js) +// Should not inline Kind.A and Kind.B here since inlineEnum is configured to 'const-only'. +console.log(Kind.A, Kind.B); +// Should inline ConstKind.A to 0 and ConstKind.B to 1 here since inlineEnum is configured to 'const-only'. +console.log(ConstKind.A, ConstKind.B); diff --git a/rspack/inline-const/package.json b/rspack/inline-const/package.json index 22c46f03c..4d173fbef 100644 --- a/rspack/inline-const/package.json +++ b/rspack/inline-const/package.json @@ -8,7 +8,7 @@ "build": "rspack build" }, "devDependencies": { - "@rspack/cli": "1.5.0-beta.0", - "@rspack/core": "1.5.0-beta.0" + "@rspack/cli": "1.5.0-rc.0", + "@rspack/core": "1.5.0-rc.0" } } diff --git a/rspack/inline-enum/package.json b/rspack/inline-enum/package.json new file mode 100644 index 000000000..4d173fbef --- /dev/null +++ b/rspack/inline-enum/package.json @@ -0,0 +1,14 @@ +{ + "name": "example-builtin-swc-loader", + "version": "1.0.0", + "private": true, + "license": "MIT", + "main": "index.js", + "scripts": { + "build": "rspack build" + }, + "devDependencies": { + "@rspack/cli": "1.5.0-rc.0", + "@rspack/core": "1.5.0-rc.0" + } +} diff --git a/rspack/inline-enum/rspack.config.mjs b/rspack/inline-enum/rspack.config.mjs new file mode 100644 index 000000000..fb88542b5 --- /dev/null +++ b/rspack/inline-enum/rspack.config.mjs @@ -0,0 +1,43 @@ +// @ts-check + +/** @type {import("@rspack/core").Configuration} */ +export default { + entry: { + main: "./src/index.ts", + }, + experiments: { + inlineEnum: true, + }, + mode: "production", + optimization: { + // disable minimize so you can understand the output + minimize: false, + }, + resolve: { + extensions: [".ts", "..."], + }, + module: { + rules: [ + { + test: /\.ts$/, + use: { + loader: "builtin:swc-loader", + /** @type {import("@rspack/core").SwcLoaderOptions} */ + options: { + jsc: { + parser: { + syntax: "typescript", + } + }, + rspackExperiments: { + collectTypeScriptInfo: { + exportedEnum: true, + } + } + }, + }, + type: "javascript/auto", + }, + ], + }, +}; diff --git a/rspack/collect-typescript-info/src/enums.ts b/rspack/inline-enum/src/enums.ts similarity index 100% rename from rspack/collect-typescript-info/src/enums.ts rename to rspack/inline-enum/src/enums.ts diff --git a/rspack/inline-enum/src/index.ts b/rspack/inline-enum/src/index.ts new file mode 100644 index 000000000..a2e17d47b --- /dev/null +++ b/rspack/inline-enum/src/index.ts @@ -0,0 +1,5 @@ +import { Kind } from './enums'; + +// Take a look at the build output (dist/main.js) +// Should inline Kind.A to 0 and Kind.B to 1 here since inlineEnum is configured. +console.log(Kind.A, Kind.B); diff --git a/rspack/type-reexports-presence/package.json b/rspack/type-reexports-presence/package.json new file mode 100644 index 000000000..4d173fbef --- /dev/null +++ b/rspack/type-reexports-presence/package.json @@ -0,0 +1,14 @@ +{ + "name": "example-builtin-swc-loader", + "version": "1.0.0", + "private": true, + "license": "MIT", + "main": "index.js", + "scripts": { + "build": "rspack build" + }, + "devDependencies": { + "@rspack/cli": "1.5.0-rc.0", + "@rspack/core": "1.5.0-rc.0" + } +} diff --git a/rspack/collect-typescript-info/rspack.config.mjs b/rspack/type-reexports-presence/rspack.config.mjs similarity index 87% rename from rspack/collect-typescript-info/rspack.config.mjs rename to rspack/type-reexports-presence/rspack.config.mjs index be507707e..97564aa6c 100644 --- a/rspack/collect-typescript-info/rspack.config.mjs +++ b/rspack/type-reexports-presence/rspack.config.mjs @@ -6,8 +6,6 @@ export default { main: "./src/index.ts", }, experiments: { - css: true, - inlineEnum: true, typeReexportsPresence: true, }, mode: "production", @@ -21,7 +19,7 @@ export default { module: { parser: { javascript: { - typeReexportsPresence: "tolerant" + typeReexportsPresence: "tolerant", } }, rules: [ @@ -34,12 +32,11 @@ export default { jsc: { parser: { syntax: "typescript", - }, + } }, rspackExperiments: { collectTypeScriptInfo: { typeExports: true, - exportedEnum: true, } } }, diff --git a/rspack/type-reexports-presence/src/index.ts b/rspack/type-reexports-presence/src/index.ts new file mode 100644 index 000000000..6f4f489bb --- /dev/null +++ b/rspack/type-reexports-presence/src/index.ts @@ -0,0 +1,6 @@ +import { TypeA, TypeB } from './reexports'; + +const a: TypeA = 42; +const b: TypeB = 'rspack'; + +console.log(a, b); diff --git a/rspack/collect-typescript-info/src/reexports.ts b/rspack/type-reexports-presence/src/reexports.ts similarity index 88% rename from rspack/collect-typescript-info/src/reexports.ts rename to rspack/type-reexports-presence/src/reexports.ts index 361587e3e..f5c6fa2ba 100644 --- a/rspack/collect-typescript-info/src/reexports.ts +++ b/rspack/type-reexports-presence/src/reexports.ts @@ -1,5 +1,3 @@ -export * from './enums'; - // Should not report ESModulesLinkingWarning since we configured `typeReexportsPresence: "tolerant"` // case 1: export { TypeA } from './types'; diff --git a/rspack/collect-typescript-info/src/types.ts b/rspack/type-reexports-presence/src/types.ts similarity index 100% rename from rspack/collect-typescript-info/src/types.ts rename to rspack/type-reexports-presence/src/types.ts