Skip to content

Latest commit

 

History

History
66 lines (45 loc) · 1.31 KB

README.md

File metadata and controls

66 lines (45 loc) · 1.31 KB

Shared typescript configuration

The purpose of the typescript is to add strong typing to javascript.

This configuration targets app next packages.


Contents

Setup

  • Add workspace reference to @muravjev/configs-ts-next and its peers dependencies:

    pnpm add -w @muravjev/configs-ts-next typescript react react-dom @types/node @types/react @types/react-dom
  • Add typescript configuration file

    // apps/foo/tsconfig.json
    
    {
      "extends": "@muravjev/configs-ts-next",
      "compilerOptions": {
        "baseUrl": "src",
        "rootDir": "src"
      },
      "include": ["next-env.d.ts", "src"]
    }
  • Turn on next externalDir experimental function:

    // apps/foo/next.config.js
    
    {
      ...
      "experimental": {
        "externalDir": true //< for workspaces
      }
      ...
    }

Donation

If you found this project helpful, consider
buying me a coffee, donate by paypal or just leave a star
Thanks for your support, it is much appreciated!

License

MIT © Sergey Muravjev


⬅ Back