Skip to content

feat(create-rsbuild): enable verbatimModuleSyntax in tsconfig#5399

Merged
chenjiahan merged 1 commit intomainfrom
create_rsbuild_tsconfig_0611
Jun 11, 2025
Merged

feat(create-rsbuild): enable verbatimModuleSyntax in tsconfig#5399
chenjiahan merged 1 commit intomainfrom
create_rsbuild_tsconfig_0611

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

@chenjiahan chenjiahan commented Jun 11, 2025

Description

Update default tsconfig.json to enable the verbatimModuleSyntax option. It is recommended and will supersede isolatedModules.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings June 11, 2025 09:03
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 11, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 4cb8949
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/6849466cfed6bb00092cfb3f
😎 Deploy Preview https://deploy-preview-5399--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 87 (🟢 up 26 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

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 updates the default TypeScript configuration across various project templates and documentation to use the new verbitimModuleSyntax option instead of isolatedModules, in line with the latest TypeScript recommendations.

  • Updated tsconfig.json files in documentation, scripts, and project templates (Vue3, Vue2, Vanilla, Svelte, Solid, React18, React, Preact, Lit, examples for Vue, React, Node, and E2E cases) to enable "verbatimModuleSyntax" and remove the deprecated "isolatedModules".
  • Ensured consistency across multiple configuration files for improved compatibility with new TypeScript behavior.

Reviewed Changes

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

Show a summary per file
File Description
website/docs/zh/guide/basic/typescript.mdx Updated tsconfig to use "verbatimModuleSyntax"
website/docs/en/guide/basic/typescript.mdx Updated tsconfig to use "verbatimModuleSyntax"
scripts/config/tsconfig.json Updated tsconfig to use "verbatimModuleSyntax"
packages/create-rsbuild/template-vue3-ts/tsconfig.json Updated tsconfig to use "verbatimModuleSyntax"
packages/create-rsbuild/template-vue2-ts/tsconfig.json Updated tsconfig to use "verbatimModuleSyntax"
packages/create-rsbuild/template-vanilla-ts/tsconfig.json Updated tsconfig to use "verbatimModuleSyntax"
packages/create-rsbuild/template-svelte-ts/tsconfig.json Updated tsconfig to use "verbatimModuleSyntax" (with removal of svelte-preprocess comment)
packages/create-rsbuild/template-solid-ts/tsconfig.json Updated tsconfig to use "verbatimModuleSyntax"
packages/create-rsbuild/template-react18-ts/tsconfig.json Updated tsconfig to use "verbatimModuleSyntax"
packages/create-rsbuild/template-react-ts/tsconfig.json Updated tsconfig to use "verbatimModuleSyntax"
packages/create-rsbuild/template-preact-ts/tsconfig.json Updated tsconfig to use "verbatimModuleSyntax"
packages/create-rsbuild/template-lit-ts/tsconfig.json Updated tsconfig to use "verbatimModuleSyntax"
examples/vue/tsconfig.json Updated tsconfig to use "verbatimModuleSyntax"
examples/react/tsconfig.json Updated tsconfig to use "verbatimModuleSyntax"
examples/node/tsconfig.json Updated tsconfig to use "verbatimModuleSyntax"
e2e/cases/server/overlay-type-errors/tsconfig.json Updated tsconfig to use "verbatimModuleSyntax"
Comments suppressed due to low confidence (2)

website/docs/en/guide/basic/typescript.mdx:28

  • Ensure the documentation explanation accompanying the tsconfig example is updated to describe the benefits and usage of 'verbatimModuleSyntax' after replacing 'isolatedModules'.
"verbatimModuleSyntax": true

packages/create-rsbuild/template-svelte-ts/tsconfig.json:7

  • [nitpick] Consider adding a concise comment explaining the rationale for replacing 'isolatedModules' with 'verbatimModuleSyntax' for svelte-preprocess compatibility, since the previous comment was removed.
"skipLibCheck": true,

@chenjiahan chenjiahan merged commit 33950be into main Jun 11, 2025
12 checks passed
@chenjiahan chenjiahan deleted the create_rsbuild_tsconfig_0611 branch June 11, 2025 09:09
@chenjiahan chenjiahan mentioned this pull request Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants