Skip to content

feat!: remove .wasm from default js extensions#13321

Merged
chenjiahan merged 4 commits intomainfrom
codex/jsextensions-wasm
Mar 13, 2026
Merged

feat!: remove .wasm from default js extensions#13321
chenjiahan merged 4 commits intomainfrom
codex/jsextensions-wasm

Conversation

@hardfist
Copy link
Copy Markdown
Contributor

@hardfist hardfist commented Mar 12, 2026

.wasm cause unnecessay probe in resolver and vite and esbuild also doesnt support .wasm in extensions

Copilot AI review requested due to automatic review settings March 12, 2026 09:11
@hardfist hardfist changed the title Remove .wasm from jsExtensions feat!: Remove .wasm from jsExtensions Mar 12, 2026
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Mar 12, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2b8fb451ff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes WebAssembly (.wasm) from the default jsExtensions list, which in turn updates the default resolver extension list to no longer include .wasm.

Changes:

  • Remove .wasm from jsExtensions in the TypeScript defaults implementation.
  • Mirror the same change in the Rust builder defaults.
  • Update JS/Rust snapshot expectations to match the new default resolve extensions.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
tests/rspack-test/defaultsCases/default/base.js Updates default-case expected output to remove .wasm from resolved extensions.
packages/rspack/src/config/defaults.ts Removes .wasm from jsExtensions in the TS defaults for resolve behavior.
crates/rspack/tests/snapshots/defaults__default_options.snap Updates snapshot of default compiler options to remove .wasm from extensions.
crates/rspack/src/builder/mod.rs Removes .wasm from js_extensions in Rust defaults to keep parity with TS.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 12, 2026

Rsdoctor Bundle Diff Analysis

⚠️ Note: The latest commit (1028117f16) does not have baseline artifacts. Using commit 20d97c22ee for baseline comparison instead. If this seems incorrect, please wait a few minutes and try rerunning the workflow.

Found 5 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Change
react-10k 5.7 MB 0
react-1k 826.2 KB 0
react-5k 2.7 MB 0
rome 984.2 KB 0
ui-components 2.3 MB 0

Generated by Rsdoctor GitHub Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 12, 2026

📝 Benchmark detail: Open

Name Base (2026-03-12 a09154b) Current Change
10000_big_production-mode_disable-minimize + exec 14.2 s ± 268 ms 14.3 s ± 266 ms +0.57 %
10000_development-mode + exec 995 ms ± 31 ms 947 ms ± 48 ms -4.81 %
10000_development-mode_hmr + stats 175 ms ± 2.2 ms 176 ms ± 3.8 ms +0.49 %
10000_development-mode_noop-loader + exec 2.09 s ± 195 ms 2.1 s ± 47 ms +0.85 %
10000_production-mode + exec 1.08 s ± 14 ms 1.11 s ± 18 ms +2.01 %
10000_production-mode_persistent-cold + exec 1.29 s ± 61 ms 1.28 s ± 52 ms -0.62 %
10000_production-mode_persistent-hot + exec 979 ms ± 23 ms 992 ms ± 23 ms +1.33 %
10000_production-mode_source-map + exec 1.27 s ± 44 ms 1.28 s ± 24 ms +0.87 %
arco-pro_development-mode + exec 1.34 s ± 75 ms 1.34 s ± 70 ms +0.06 %
arco-pro_development-mode_hmr + stats 37 ms ± 1.2 ms 38 ms ± 2 ms +2.27 %
arco-pro_production-mode + exec 2.47 s ± 96 ms 2.5 s ± 103 ms +1.16 %
arco-pro_production-mode_generate-package-json-webpack-plugin + exec 2.54 s ± 109 ms 2.53 s ± 91 ms -0.56 %
arco-pro_production-mode_persistent-cold + exec 2.52 s ± 106 ms 2.53 s ± 116 ms +0.09 %
arco-pro_production-mode_persistent-hot + exec 1.38 s ± 43 ms 1.39 s ± 42 ms +0.48 %
arco-pro_production-mode_source-map + exec 2.88 s ± 117 ms 2.87 s ± 58 ms -0.16 %
arco-pro_production-mode_traverse-chunk-modules + exec 2.52 s ± 66 ms 2.54 s ± 67 ms +0.93 %
bundled-threejs_development-mode + exec 194 ms ± 3.6 ms 194 ms ± 3.1 ms +0.10 %
bundled-threejs_production-mode + exec 226 ms ± 3.7 ms 231 ms ± 9.6 ms +1.86 %
large-dyn-imports_development-mode + exec 1.25 s ± 29 ms 1.2 s ± 33 ms -3.37 %
large-dyn-imports_production-mode + exec 1.32 s ± 23 ms 1.34 s ± 19 ms +1.45 %
threejs_development-mode_10x + exec 849 ms ± 32 ms 862 ms ± 22 ms +1.44 %
threejs_development-mode_10x_hmr + stats 119 ms ± 3.1 ms 121 ms ± 8.6 ms +1.37 %
threejs_production-mode_10x + exec 3.08 s ± 35 ms 3.09 s ± 50 ms +0.38 %
threejs_production-mode_10x_persistent-cold + exec 3.2 s ± 18 ms 3.23 s ± 51 ms +0.79 %
threejs_production-mode_10x_persistent-hot + exec 2.59 s ± 24 ms 2.63 s ± 42 ms +1.22 %
threejs_production-mode_10x_source-map + exec 3.78 s ± 43 ms 3.82 s ± 58 ms +1.02 %
10000_big_production-mode_disable-minimize + rss memory 2011 MiB ± 13 MiB 2014 MiB ± 49.4 MiB +0.12 %
10000_development-mode + rss memory 660 MiB ± 8.7 MiB 600 MiB ± 26.2 MiB -9.07 %
10000_development-mode_hmr + rss memory 884 MiB ± 30.3 MiB 808 MiB ± 23.8 MiB -8.59 %
10000_development-mode_noop-loader + rss memory 950 MiB ± 15.8 MiB 893 MiB ± 5.65 MiB -6.05 %
10000_production-mode + rss memory 557 MiB ± 8.94 MiB 542 MiB ± 10.3 MiB -2.69 %
10000_production-mode_persistent-cold + rss memory 747 MiB ± 7.33 MiB 739 MiB ± 15.3 MiB -1.04 %
10000_production-mode_persistent-hot + rss memory 755 MiB ± 15.6 MiB 746 MiB ± 12.7 MiB -1.32 %
10000_production-mode_source-map + rss memory 571 MiB ± 10.3 MiB 572 MiB ± 10.6 MiB +0.05 %
arco-pro_development-mode + rss memory 480 MiB ± 11.9 MiB 475 MiB ± 3.56 MiB -0.94 %
arco-pro_development-mode_hmr + rss memory 500 MiB ± 6.63 MiB 492 MiB ± 3.38 MiB -1.55 %
arco-pro_production-mode + rss memory 670 MiB ± 14.4 MiB 669 MiB ± 21.9 MiB -0.16 %
arco-pro_production-mode_generate-package-json-webpack-plugin + rss memory 691 MiB ± 13.2 MiB 676 MiB ± 55.2 MiB -2.17 %
arco-pro_production-mode_persistent-cold + rss memory 749 MiB ± 9.1 MiB 744 MiB ± 15.4 MiB -0.60 %
arco-pro_production-mode_persistent-hot + rss memory 559 MiB ± 35 MiB 554 MiB ± 24.6 MiB -0.89 %
arco-pro_production-mode_source-map + rss memory 767 MiB ± 16.9 MiB 745 MiB ± 26.9 MiB -2.78 %
arco-pro_production-mode_traverse-chunk-modules + rss memory 674 MiB ± 17.5 MiB 670 MiB ± 18.5 MiB -0.54 %
bundled-threejs_development-mode + rss memory 159 MiB ± 7.58 MiB 155 MiB ± 9.86 MiB -2.46 %
bundled-threejs_production-mode + rss memory 181 MiB ± 8.08 MiB 178 MiB ± 5.9 MiB -1.48 %
large-dyn-imports_development-mode + rss memory 657 MiB ± 7.31 MiB 599 MiB ± 34.9 MiB -8.83 %
large-dyn-imports_production-mode + rss memory 464 MiB ± 10.2 MiB 459 MiB ± 11.4 MiB -0.88 %
threejs_development-mode_10x + rss memory 541 MiB ± 24.1 MiB 536 MiB ± 10.2 MiB -0.95 %
threejs_development-mode_10x_hmr + rss memory 678 MiB ± 15.4 MiB 677 MiB ± 15.7 MiB -0.07 %
threejs_production-mode_10x + rss memory 724 MiB ± 10.3 MiB 722 MiB ± 27.5 MiB -0.26 %
threejs_production-mode_10x_persistent-cold + rss memory 859 MiB ± 15 MiB 856 MiB ± 18.4 MiB -0.44 %
threejs_production-mode_10x_persistent-hot + rss memory 707 MiB ± 12.6 MiB 701 MiB ± 11.5 MiB -0.89 %
threejs_production-mode_10x_source-map + rss memory 857 MiB ± 32 MiB 856 MiB ± 35.4 MiB -0.14 %

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 12, 2026

📦 Binary Size-limit

Comparing 5b6c4ea to chore: lock emnapi (#13329) by CPunisher

🙈 Size remains the same at 49.01MB

@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Mar 12, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 12, 2026

Merging this PR will not alter performance

✅ 16 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing codex/jsextensions-wasm (5b6c4ea) with main (20d97c2)2

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (54cec54) during the generation of this report, so 20d97c2 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 12, 2026

Deploying rspack with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5b6c4ea
Status: ✅  Deploy successful!
Preview URL: https://769db438.rspack-v2.pages.dev
Branch Preview URL: https://codex-jsextensions-wasm.rspack-v2.pages.dev

View logs

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 12, 2026

📝 Benchmark detail: Open

Name Base (2026-03-12 a09154b) Current Change
10000_big_production-mode_disable-minimize + exec 14.2 s ± 268 ms 14.2 s ± 161 ms +0.33 %
10000_development-mode + exec 995 ms ± 31 ms 929 ms ± 32 ms -6.58 %
10000_development-mode_hmr + stats 175 ms ± 2.2 ms 174 ms ± 13 ms -0.81 %
10000_development-mode_noop-loader + exec 2.09 s ± 195 ms 2.08 s ± 9.9 ms -0.21 %
10000_production-mode + exec 1.08 s ± 14 ms 1.07 s ± 12 ms -1.24 %
10000_production-mode_persistent-cold + exec 1.29 s ± 61 ms 1.26 s ± 49 ms -2.08 %
10000_production-mode_persistent-hot + exec 979 ms ± 23 ms 951 ms ± 14 ms -2.78 %
10000_production-mode_source-map + exec 1.27 s ± 44 ms 1.25 s ± 31 ms -1.06 %
arco-pro_development-mode + exec 1.34 s ± 75 ms 1.33 s ± 42 ms -0.87 %
arco-pro_development-mode_hmr + stats 37 ms ± 1.2 ms 37 ms ± 3.7 ms +0.40 %
arco-pro_production-mode + exec 2.47 s ± 96 ms 2.43 s ± 57 ms -1.74 %
arco-pro_production-mode_generate-package-json-webpack-plugin + exec 2.54 s ± 109 ms 2.54 s ± 93 ms +0.15 %
arco-pro_production-mode_persistent-cold + exec 2.52 s ± 106 ms 2.5 s ± 65 ms -0.88 %
arco-pro_production-mode_persistent-hot + exec 1.38 s ± 43 ms 1.37 s ± 30 ms -1.03 %
arco-pro_production-mode_source-map + exec 2.88 s ± 117 ms 2.84 s ± 56 ms -1.18 %
arco-pro_production-mode_traverse-chunk-modules + exec 2.52 s ± 66 ms 2.53 s ± 246 ms +0.18 %
bundled-threejs_development-mode + exec 194 ms ± 3.6 ms 192 ms ± 3.5 ms -0.93 %
bundled-threejs_production-mode + exec 226 ms ± 3.7 ms 225 ms ± 3.8 ms -0.62 %
large-dyn-imports_development-mode + exec 1.25 s ± 29 ms 1.19 s ± 22 ms -4.67 %
large-dyn-imports_production-mode + exec 1.32 s ± 23 ms 1.32 s ± 52 ms -0.39 %
threejs_development-mode_10x + exec 849 ms ± 32 ms 841 ms ± 21 ms -0.99 %
threejs_development-mode_10x_hmr + stats 119 ms ± 3.1 ms 115 ms ± 5.7 ms -3.96 %
threejs_production-mode_10x + exec 3.08 s ± 35 ms 3.05 s ± 57 ms -1.03 %
threejs_production-mode_10x_persistent-cold + exec 3.2 s ± 18 ms 3.15 s ± 47 ms -1.52 %
threejs_production-mode_10x_persistent-hot + exec 2.59 s ± 24 ms 2.57 s ± 34 ms -0.90 %
threejs_production-mode_10x_source-map + exec 3.78 s ± 43 ms 3.73 s ± 68 ms -1.37 %
10000_big_production-mode_disable-minimize + rss memory 2011 MiB ± 13 MiB 2023 MiB ± 59 MiB +0.57 %
10000_development-mode + rss memory 660 MiB ± 8.7 MiB 594 MiB ± 8.64 MiB -9.97 %
10000_development-mode_hmr + rss memory 884 MiB ± 30.3 MiB 804 MiB ± 42.7 MiB -9.07 %
10000_development-mode_noop-loader + rss memory 950 MiB ± 15.8 MiB 892 MiB ± 17.3 MiB -6.13 %
10000_production-mode + rss memory 557 MiB ± 8.94 MiB 534 MiB ± 14.8 MiB -4.07 %
10000_production-mode_persistent-cold + rss memory 747 MiB ± 7.33 MiB 735 MiB ± 11.3 MiB -1.59 %
10000_production-mode_persistent-hot + rss memory 755 MiB ± 15.6 MiB 747 MiB ± 17.6 MiB -1.06 %
10000_production-mode_source-map + rss memory 571 MiB ± 10.3 MiB 563 MiB ± 23.9 MiB -1.51 %
arco-pro_development-mode + rss memory 480 MiB ± 11.9 MiB 475 MiB ± 6.63 MiB -0.97 %
arco-pro_development-mode_hmr + rss memory 500 MiB ± 6.63 MiB 491 MiB ± 14 MiB -1.68 %
arco-pro_production-mode + rss memory 670 MiB ± 14.4 MiB 672 MiB ± 20.3 MiB +0.26 %
arco-pro_production-mode_generate-package-json-webpack-plugin + rss memory 691 MiB ± 13.2 MiB 677 MiB ± 21.7 MiB -1.91 %
arco-pro_production-mode_persistent-cold + rss memory 749 MiB ± 9.1 MiB 743 MiB ± 7.82 MiB -0.83 %
arco-pro_production-mode_persistent-hot + rss memory 559 MiB ± 35 MiB 555 MiB ± 20.5 MiB -0.69 %
arco-pro_production-mode_source-map + rss memory 767 MiB ± 16.9 MiB 762 MiB ± 6.22 MiB -0.59 %
arco-pro_production-mode_traverse-chunk-modules + rss memory 674 MiB ± 17.5 MiB 675 MiB ± 23.9 MiB +0.21 %
bundled-threejs_development-mode + rss memory 159 MiB ± 7.58 MiB 156 MiB ± 6.71 MiB -1.84 %
bundled-threejs_production-mode + rss memory 181 MiB ± 8.08 MiB 178 MiB ± 14.4 MiB -1.54 %
large-dyn-imports_development-mode + rss memory 657 MiB ± 7.31 MiB 579 MiB ± 39.8 MiB -11.84 %
large-dyn-imports_production-mode + rss memory 464 MiB ± 10.2 MiB 459 MiB ± 10.1 MiB -0.96 %
threejs_development-mode_10x + rss memory 541 MiB ± 24.1 MiB 533 MiB ± 11.4 MiB -1.41 %
threejs_development-mode_10x_hmr + rss memory 678 MiB ± 15.4 MiB 682 MiB ± 19.6 MiB +0.61 %
threejs_production-mode_10x + rss memory 724 MiB ± 10.3 MiB 718 MiB ± 9.63 MiB -0.82 %
threejs_production-mode_10x_persistent-cold + rss memory 859 MiB ± 15 MiB 856 MiB ± 5.57 MiB -0.42 %
threejs_production-mode_10x_persistent-hot + rss memory 707 MiB ± 12.6 MiB 701 MiB ± 12.2 MiB -0.83 %
threejs_production-mode_10x_source-map + rss memory 857 MiB ± 32 MiB 849 MiB ± 39 MiB -0.89 %

@hardfist hardfist changed the title feat!: Remove .wasm from jsExtensions feat!: remove .wasm from default js extensions Mar 12, 2026
@hardfist hardfist force-pushed the codex/jsextensions-wasm branch from 35e2d12 to 5b6c4ea Compare March 12, 2026 14:36
@chenjiahan chenjiahan merged commit 475e5a9 into main Mar 13, 2026
50 checks passed
@chenjiahan chenjiahan deleted the codex/jsextensions-wasm branch March 13, 2026 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants