Skip to content

Commit

Permalink
"Clarify the 'Existing Projects' section of the TypeScript docs: (#52944
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 21, 2023
1 parent 032e8d0 commit 3e34b9f
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -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.

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>

## TypeScript Plugin
Expand Down

0 comments on commit 3e34b9f

Please sign in to comment.