Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

  • Add // @ts-check and type annotations to JS configs to helping users to identify invalid configurations.
  • Import and use SwcLoaderOptions type in TS configs

Related links

https://www.typescriptlang.org/docs/handbook/intro-to-js-ts.html#ts-check

Checklist

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

Copilot AI review requested due to automatic review settings October 16, 2025 13:30
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Oct 16, 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 enhances type safety for Rspack configuration templates by adding TypeScript type checking to JavaScript configs and improving type annotations in TypeScript configs. The changes help users identify invalid configurations at development time.

  • Added // @ts-check comments and JSDoc type annotations to JavaScript config files
  • Imported and used SwcLoaderOptions type with satisfies operator in TypeScript configs
  • Removed unused import statements from Vue JS template

Reviewed Changes

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

Show a summary per file
File Description
packages/create-rspack/template-vue-ts/rspack.config.ts Added SwcLoaderOptions import and satisfies type annotation
packages/create-rspack/template-vue-js/rspack.config.mjs Added @ts-check and JSDoc type annotation, removed unused imports
packages/create-rspack/template-vanilla-ts/rspack.config.ts Added SwcLoaderOptions import and satisfies type annotations
packages/create-rspack/template-vanilla-js/rspack.config.mjs Added @ts-check and JSDoc type annotation
packages/create-rspack/template-react-ts/rspack.config.ts Added SwcLoaderOptions import and satisfies type annotation
packages/create-rspack/template-react-js/rspack.config.mjs Added @ts-check and JSDoc type annotation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Oct 16, 2025
@netlify
Copy link

netlify bot commented Oct 16, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 32a3cdf
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68f0f3674fd78c0008062d24

@github-actions
Copy link
Contributor

📦 Binary Size-limit

Comparing 32a3cdf to test: rewrite hot test cases with NEXT_HMR (#11882) by harpsealjs

🙈 Size remains the same at 47.67MB

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 16, 2025

CodSpeed Performance Report

Merging #11896 will not alter performance

Comparing create_rspack_ts_check_1016 (32a3cdf) with main (26eae5c)

Summary

✅ 17 untouched

@chenjiahan chenjiahan requested a review from CPunisher October 16, 2025 14:08
@chenjiahan chenjiahan enabled auto-merge (squash) October 16, 2025 14:09
@chenjiahan chenjiahan merged commit 2ccce25 into main Oct 16, 2025
71 of 73 checks passed
@chenjiahan chenjiahan deleted the create_rspack_ts_check_1016 branch October 16, 2025 14:10
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.

2 participants