Skip to content

Commit f906508

Browse files
improvement: apply absolute import
1 parent 0b2ec70 commit f906508

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog
22

3+
- improvement: apply absolute import
4+
35
## v1.1.0
46
- improvement: update Next.js version to 9.5.4
57
- improvement: change _app.js and index.js to tsx file

pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Greeting from 'src/components/Greeting'
1+
import Greeting from '~/src/components/Greeting'
22

33
export default function IndexPage() {
44
return (
File renamed without changes.

tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
"resolveJsonModule": true,
1818
"isolatedModules": true,
1919
"jsx": "preserve",
20-
"baseUrl": "./"
20+
"baseUrl": ".",
21+
"paths": {
22+
"~/*": ["./*"]
23+
}
2124
},
2225
"exclude": [
2326
"node_modules",

0 commit comments

Comments
 (0)