Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,11 @@ const defaultOptions = {
memoryLimit: 8192,
// use tsconfig of user project
configFile: tsconfigPath,
tsgo: false,
// use typescript of user project
typescriptPath: require.resolve('typescript'),
typescriptPath: tsgo
? require.resolve('@typescript/native-preview/package.json')
: require.resolve('typescript'),
Comment thread
Timeless0911 marked this conversation as resolved.
},
issue: {
// ignore types errors from node_modules
Expand All @@ -136,6 +139,26 @@ const defaultOptions = {
};
```

#### TypeScript Go support

TypeScript Go support is powered by `ts-checker-rspack-plugin`'s experimental, CLI-based integration for [typescript-go](https://github.com/microsoft/typescript-go). It runs the `tsgo` binary for type checking and can reduce type-checking time by about 5-10x.

To enable it, install `@typescript/native-preview` and set `typescript.tsgo` to `true`:

```ts
pluginTypeCheck({
tsCheckerOptions: {
typescript: {
tsgo: true,
},
},
});
```

When `tsgo` is enabled, the default `typescript.typescriptPath` resolves to `@typescript/native-preview/package.json`. If you set `typescript.typescriptPath` manually in `tsgo` mode, it must be an absolute path to `@typescript/native-preview/package.json`.

For supported options and limitations, see [ts-checker-rspack-plugin - TypeScript Go support](https://github.com/rstackjs/ts-checker-rspack-plugin#typescript-go-support).

#### Object Type

When the value of `tsCheckerOptions` is an object, it will be deeply merged with the default configuration.
Expand Down
15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@
],
"scripts": {
"build": "rslib",
"bump": "npx bumpp",
"dev": "rslib -w",
"lint": "rslint && prettier -c .",
"lint:write": "rslint --fix && prettier -w .",
"prepare": "simple-git-hooks",
"test": "playwright test",
"bump": "npx bumpp"
"test": "playwright test"
},
"simple-git-hooks": {
"pre-commit": "pnpm run lint:write"
},
"dependencies": {
"deepmerge": "^4.3.1",
"ts-checker-rspack-plugin": "^1.3.1",
"json5": "^2.2.3",
"reduce-configs": "^1.1.2"
"reduce-configs": "^1.1.2",
"ts-checker-rspack-plugin": "^1.4.0"
},
"devDependencies": {
"@playwright/test": "^1.60.0",
Expand All @@ -40,18 +40,23 @@
"@rslint/core": "^0.5.3",
"@types/fs-extra": "^11.0.4",
"@types/node": "^24.12.4",
"@typescript/native-preview": "7.0.0-dev.20260607.1",
"fs-extra": "^11.3.5",
"playwright": "^1.60.0",
"prettier": "^3.8.3",
"simple-git-hooks": "^2.13.1",
"typescript": "^6.0.3"
},
"peerDependencies": {
"@rsbuild/core": "^1.0.0 || ^2.0.0"
"@rsbuild/core": "^1.0.0 || ^2.0.0-0",
"@typescript/native-preview": "^7.0.0-0"
},
"peerDependenciesMeta": {
"@rsbuild/core": {
"optional": true
},
"@typescript/native-preview": {
"optional": true
}
},
"packageManager": "pnpm@11.5.0",
Expand Down
Loading
Loading