Skip to content

Refactor bit Boilerplate app.js build steps (#12207)#12208

Merged
yasmoradi merged 3 commits intobitfoundation:developfrom
yasmoradi:12207
Mar 24, 2026
Merged

Refactor bit Boilerplate app.js build steps (#12207)#12208
yasmoradi merged 3 commits intobitfoundation:developfrom
yasmoradi:12207

Conversation

@yasmoradi
Copy link
Member

@yasmoradi yasmoradi commented Mar 21, 2026

closes #12207

Summary by CodeRabbit

  • Documentation

    • Updated build process documentation reflecting TypeScript compilation and JavaScript bundling workflow.
  • Chores

    • Updated build configuration with explicit browser compatibility targets: Safari 15, Firefox 100, Chrome 95.
    • Refined TypeScript compiler settings for improved type validation.

@yasmoradi yasmoradi requested a review from Copilot March 21, 2026 20:45
@coderabbitai
Copy link

coderabbitai bot commented Mar 21, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8abab9e1-8a98-4a45-bdd7-e4f0cdd4d321

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

The TypeScript build pipeline was refactored to separate concerns: tsc now performs type-checking only via noEmit: true, while esbuild directly transpiles and bundles from .ts sources to wwwroot/scripts/app.js with explicit browser targets (safari15,firefox100,chrome95).

Changes

Cohort / File(s) Summary
Build Configuration
src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj, src/Client/Boilerplate.Client.Core/tsconfig.json
Updated BuildJavaScript MSBuild target to invoke esbuild on Scripts/index.ts instead of Scripts/index.js with explicit --target=safari15,firefox100,chrome95. Added noEmit: true to tsconfig, removed compileOnSave, and updated compilerOptions.lib from ["DOM", "ESNext"] to ["DOM", "DOM.Iterable", "ES2019"].
Documentation
.docs/11- TypeScript, Build Process & JavaScript Interop.md
Revised Stage 11 documentation to reflect the split pipeline: tsc performs type-checking only while esbuild bundles directly from TypeScript sources, removing prior "compile to JS then bundle" language and updating uuid demo instructions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A rabbit's delight in the bundler's new way,
TypeScript checks types, then esbuild holds sway,
From .ts straight to bundled delight,
Safari and Firefox now shine oh so bright,
The pipeline is cleaner, the separation so fine!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: refactoring the build process for app.js bundling in the Bit Boilerplate application.
Linked Issues check ✅ Passed All code changes successfully implement the requirements: TypeScript configured for type-checking only via noEmit:true, esbuild handles transpilation and bundling from .ts sources.
Out of Scope Changes check ✅ Passed All changes are directly related to the build pipeline refactoring objective: tsconfig.json configuration, MSBuild target updates, and documentation reflecting the new pipeline.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can generate a title for your PR based on the changes.

Add @coderabbitai placeholder anywhere in the title of your PR and CodeRabbit will replace it with a title based on the changes in the PR. You can change the placeholder by changing the reviews.auto_title_placeholder setting.

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

Refactors the Boilerplate Bit template’s JavaScript build to a split pipeline: tsc performs type-checking only, while esbuild bundles directly from TypeScript sources into app.js.

Changes:

  • Update TypeScript config to disable emit (noEmit: true) and adjust lib definitions.
  • Update MSBuild BuildJavaScript target to bundle from Scripts/index.ts and set explicit browser targets.
  • Update the Stage 11 docs to describe the split pipeline and the updated build commands.

Reviewed changes

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

File Description
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/tsconfig.json Adds split-pipeline note, switches libs, and enables noEmit so tsc acts as a checker only.
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj Changes esbuild entrypoint to .ts and adds explicit --target browser matrix.
src/Templates/Boilerplate/Bit.Boilerplate/.docs/11- TypeScript, Build Process & JavaScript Interop.md Aligns documentation with new “type-check only + esbuild bundle” workflow and updated commands.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/Templates/Boilerplate/Bit.Boilerplate/.docs/11-` TypeScript, Build
Process & JavaScript Interop.md:
- Around line 26-33: The documentation's example compilerOptions shows "module":
"es2015" which is inconsistent with the actual tsconfig.json using "ESNext";
update the docs in the Markdown example so the compilerOptions "module" property
reads "ESNext" to match the real tsconfig.json (look for the compilerOptions
block and the "module" key in the file and replace "es2015" with "ESNext");
alternatively, if the intended project setting is "es2015", change the project's
tsconfig.json "module" to "es2015" so both the tsconfig.json and the
documentation match.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f85ef5cf-0661-4ba4-bdaf-5655111b0e9c

📥 Commits

Reviewing files that changed from the base of the PR and between a692bfd and 6afc6d4.

📒 Files selected for processing (3)
  • src/Templates/Boilerplate/Bit.Boilerplate/.docs/11- TypeScript, Build Process & JavaScript Interop.md
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/tsconfig.json

yasmoradi and others added 2 commits March 21, 2026 21:57
…, Build Process & JavaScript Interop.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Yas Moradi <yas_moradi@outlook.com>
@yasmoradi yasmoradi merged commit 32364c7 into bitfoundation:develop Mar 24, 2026
3 checks passed
@yasmoradi yasmoradi deleted the 12207 branch March 24, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bit Boilerplate app.js build steps need refactoring

2 participants