Skip to content

Instantly share code, notes, and snippets.

@agcty
Last active November 22, 2020 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agcty/9d3581535d41876396576a17937097b9 to your computer and use it in GitHub Desktop.
Save agcty/9d3581535d41876396576a17937097b9 to your computer and use it in GitHub Desktop.
Update tsconfig for absoulte imports next.js
{
"compilerOptions": {
"target": "ES2017",
"lib": ["es6", "dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "ESNEXT",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"baseUrl": ".",
"paths": {
"@components/*": ["./src/components/*"],
"@api/*": ["./src/api/*"],
"@models/*": ["./src/models/*"],
"@screens/*": ["./src/screens/*"],
"@hooks/*": ["./src/hooks/*"],
"@services/*": ["./src/services/*"],
"@constants": ["./src/constants.ts"],
"@context/*": ["./src/context/*"],
"@queries/*": ["./src/queries/*"],
"@data/*": ["./src/data/*"],
"@typeDefs/*": ["./src/types/*"],
"@generated/*": ["./src/generated/*"],
"@public/*": ["./public/*"],
"@utils/*": ["./src/utils/*"],
"@app/*": ["./src/app/*"],
"@assets/*": ["./src/assets/*"]
}
},
"exclude": ["node_modules"],
"include": [
"**/*.ts",
"**/*.tsx",
"next-env.d.ts",
"next.config.js",
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment