feat(create-rsbuild): enable verbatimModuleSyntax in tsconfig#5399
Merged
chenjiahan merged 1 commit intomainfrom Jun 11, 2025
Merged
feat(create-rsbuild): enable verbatimModuleSyntax in tsconfig#5399chenjiahan merged 1 commit intomainfrom
verbatimModuleSyntax in tsconfig#5399chenjiahan merged 1 commit intomainfrom
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
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,
This was referenced Jun 13, 2025
Merged
Merged
2 tasks
Closed
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Update default tsconfig.json to enable the
verbatimModuleSyntaxoption. It is recommended and will supersedeisolatedModules.Related Links
importsNotUsedAsValuesandpreserveValueImportsin favor of single flag microsoft/TypeScript#51479 (comment)Checklist