Skip to content

Commit

Permalink
chore(foo): setup ts-next
Browse files Browse the repository at this point in the history
  • Loading branch information
muravjev committed Oct 30, 2022
1 parent 9e61382 commit a6046ba
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 37 deletions.
5 changes: 5 additions & 0 deletions apps/foo/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
5 changes: 4 additions & 1 deletion apps/foo/next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true
swcMinify: true,
experimental: {
externalDir: true //< for workspaces
}
};

module.exports = nextConfig;
10 changes: 2 additions & 8 deletions apps/foo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,10 @@
"lint": "next lint"
},
"dependencies": {
"next": "13.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"next": "13.0.0"
},
"devDependencies": {
"@types/node": "^18.11.7",
"@types/react": "^18.0.24",
"@types/react-dom": "^18.0.8",
"eslint": "^8.26.0",
"eslint-config-next": "13.0.0",
"typescript": "^4.8.4"
"eslint-config-next": "13.0.0"
}
}
20 changes: 4 additions & 16 deletions apps/foo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
{
"extends": "@muravjev/configs-ts-next",
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true
"baseUrl": "src",
"rootDir": "src"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
"include": ["next-env.d.ts", "src"]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@muravjev/configs-remark": "^0.1.3",
"@muravjev/configs-syncpack": "^0.1.2",
"@muravjev/configs-ts": "^0.1.1",
"@muravjev/configs-ts-next": "^0.1.2",
"@muravjev/configs-ts-react": "^0.1.3",
"@testing-library/react": "^13.4.0",
"@types/jest": "^29.2.0",
Expand Down
59 changes: 47 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a6046ba

Please sign in to comment.