Cheat Sheets

Next JS

Created: 2021 January 24th

Updated: 2021 January 24th

Absolute imports

“Make a (or use your existing) jsconfig.json at the top of your project. If you’re using TypeScript, you can make a tsconfig.json instead. Put something like this inside of that file:”

{
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@components/*": ["src/components/*"],
"@designsystem/*": ["src/designsystem/*"],
"@buttons/*": ["src/designsystem/buttons"]
}
}
}
  • src