Unverified Commit 3e34b9f2 authored by Shaun Ferris's avatar Shaun Ferris Committed by GitHub

"Clarify the 'Existing Projects' section of the TypeScript docs: (#52944)

> Add a sentence to the instructions for using typescript in an existing project instructing the user to copy the `paths` compiler option from the existing jsconfig file to the new tsconfig file.
> Not doing so causes absolute imports from project directories to break, and gives "Module Not Found" messages that the docs do not have a case for solving"
parent 032e8d0e
...@@ -29,6 +29,8 @@ npx create-next-app@latest ...@@ -29,6 +29,8 @@ npx create-next-app@latest
Add TypeScript to your project by renaming a file to `.ts` / `.tsx`. Run `next dev` and `next build` to automatically install the necessary dependencies and add a `tsconfig.json` file with the recommended config options. Add TypeScript to your project by renaming a file to `.ts` / `.tsx`. Run `next dev` and `next build` to automatically install the necessary dependencies and add a `tsconfig.json` file with the recommended config options.
If you already had a `jsconfig.json` file, copy the `paths` compiler option from the old `jsconfig.json` into the new `tsconfig.json` file, and delete the old `jsconfig.json` file.
<AppOnly> <AppOnly>
## TypeScript Plugin ## TypeScript Plugin
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment