Skip to content

Commit 715512c

Browse files
authored
chore: add documentation on recommended TypeScript sourcemap option (#6122)
1 parent a0316a8 commit 715512c

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

docs/api/node-events/overview.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ You can use the `file:preprocessor` event to do things like:
141141
- Write your test code in ClojureScript.
142142
- Customize the Babel settings to add your own plugins.
143143
- Customize the options for compiling TypeScript.
144-
- Swap out webpack for Browserify or anything else.
144+
- Swap out Webpack for Vite or anything else.
145145

146146
Check out our [File Preprocessor API docs](/api/node-events/preprocessors-api) which
147147
describe how to use this event.

docs/app/tooling/typescript-support.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ with the following configuration:
6363
"compilerOptions": {
6464
"target": "es5",
6565
"lib": ["es5", "dom"],
66+
"sourceMap": true,
6667
"types": ["cypress", "node"]
6768
},
6869
"include": ["**/*.ts"]

docs/partials/_source-maps.mdx

+5
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,8 @@ source maps are enabled to get the same experience. Some examples of this includ
2727
option: `prettySourceMaps`, but this option is buggy and setting source maps on the esbuild
2828
bundler directly works better.
2929
- The other bundlers all default their source maps appropriately.
30+
31+
If using [TypeScript](https://www.typescriptlang.org/) with any custom preprocessor, you will want to make sure that the [TypeScript](https://www.typescriptlang.org/)
32+
compiler is generating source maps. This can be done by setting the [`sourceMap`](https://www.typescriptlang.org/tsconfig/#sourceMap) option in your
33+
`tsconfig.json` to `true`. The [`inlineSourceMap`](https://www.typescriptlang.org/tsconfig/#inlineSourceMap) option is **not** recommended as it does not provide an accurate code frame.
34+
Please see our recommended [tsconfig.json](/app/tooling/typescript-support#Configure-tsconfigjson) as a reference.

0 commit comments

Comments
 (0)