Skip to content

Commit

Permalink
"Clarify the 'Existing Projects' section of the TypeScript docs:
Browse files Browse the repository at this point in the history
> 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"
  • Loading branch information
ShaunFerris committed Jul 20, 2023
1 parent 2b49741 commit 396c2cb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ npx create-next-app@latest

## Existing Projects

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. Finally, copy the `paths` compiler option from your existing `jsconfig.json` file into the compiler options of the `tsconfig.json` file, and delete the `jsconfig.json` file.

<AppOnly>

Expand Down

0 comments on commit 396c2cb

Please sign in to comment.