Skip to content

Commit 1cab6dd

Browse files
committed
Add absolute aliases
1 parent ee7a2b7 commit 1cab6dd

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

jsconfig.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": "./",
4+
"paths": {
5+
"@components/*": ["components/*"],
6+
"@utils/*": ["utils/*"]
7+
}
8+
}
9+
}

pages/about.js

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

33
const About = ({ title, description, ...props }) => {
44
return (

pages/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import Layout from '../components/Layout'
2-
import PostList from '../components/PostList'
1+
import Layout from '@components/Layout'
2+
import PostList from '@components/PostList'
33

4-
import getPosts from '../utils/getPosts'
4+
import getPosts from '@utils/getPosts'
55

66
const Index = ({ posts, title, description, ...props }) => {
77
return (

pages/post/[postname].js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import Link from 'next/link'
22
import matter from 'gray-matter'
33
import ReactMarkdown from 'react-markdown'
44

5-
import Layout from '../../components/Layout'
6-
import getSlugs from '../../utils/getSlugs'
5+
import Layout from '@components/Layout'
6+
import getSlugs from '@utils/getSlugs'
77

88
export default function BlogPost({ siteTitle, frontmatter, markdownBody }) {
99
if (!frontmatter) return <></>

0 commit comments

Comments
 (0)