Skip to content

Conversation

@chenjiahan
Copy link
Member

@chenjiahan chenjiahan commented Nov 6, 2025

Summary

This PR removes the redundant // webpackBootstrap comment from Rspack's generated bundles to make the output cleaner.

The comment originally came from webpack’s bundle template to mark the beginning of its runtime bootstrap code. However, it no longer serves any functional or semantic purpose — it's purely historical and has no effect on execution or debugging.

Related

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings November 6, 2025 09:49
@netlify
Copy link

netlify bot commented Nov 6, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 8ff68cc
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/690c7238ee9e170008716185

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Nov 6, 2025
Copy link
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 the // webpackBootstrap comment from the generated JavaScript bundle output. The comment previously appeared in the IIFE wrapper at the top of bundled files and has been removed to reduce bundle size.

Key changes:

  • Removed the // webpackBootstrap comment from the IIFE wrapper in both arrow function and regular function formats
  • Updated all snapshot tests to reflect the reduced bundle sizes (typically 20 bytes smaller)
  • Updated test assertions that checked for the presence of this comment

Reviewed Changes

Copilot reviewed 33 out of 33 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/rspack_plugin_javascript/src/plugin/mod.rs Removed // webpackBootstrap comment from IIFE wrapper generation
tests/rspack-test/configCases/library/amd-named/index.js Updated test assertion to match new output without the comment
tests/rspack-test/statsOutputCases/*/stats.txt Updated snapshot files reflecting reduced bundle sizes
tests/rspack-test/hookCases/*/output.snap.txt Updated hook test snapshots to match new output format
tests/rspack-test/hookCases/*/hooks.snap.txt Updated hook snapshots showing asset content without the comment
tests/rspack-test/configCases/rsdoctor/assets/rspack.config.js Updated inline snapshot with new asset sizes

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

📦 Binary Size-limit

Comparing 8ff68cc to test: enable more watch cases (#12106) by harpsealjs

🙈 Size remains the same at 47.89MB

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 6, 2025

CodSpeed Performance Report

Merging #12108 will not alter performance

Comparing remove_bootstrap_comment_1106 (8ff68cc) with main (daca78b)

Summary

✅ 17 untouched

@chenjiahan chenjiahan merged commit c891a13 into main Nov 6, 2025
44 checks passed
@chenjiahan chenjiahan deleted the remove_bootstrap_comment_1106 branch November 6, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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