Refactor import statements to use absolute paths
This commit is contained in:
parent
7afdc0dd92
commit
3a2ec92cde
@ -1,5 +1,5 @@
|
||||
---
|
||||
import "global.css";
|
||||
import "@/global.css";
|
||||
export interface Props {
|
||||
title: string;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
import Layout from "src/layouts/Layout.astro";
|
||||
import { getPosts } from "src/utils/payload";
|
||||
import Layout from "@/layouts/Layout.astro";
|
||||
import { getPosts } from "@/utils/payload";
|
||||
|
||||
const posts = await getPosts();
|
||||
---
|
||||
|
@ -1,8 +1,8 @@
|
||||
---
|
||||
import Layout from "src/layouts/Layout.astro";
|
||||
import Content from "src/components/Content.astro";
|
||||
import type { Post } from "src/types";
|
||||
import { getPost, getPosts } from "src/utils/payload";
|
||||
import Layout from "@/layouts/Layout.astro";
|
||||
import Content from "@/components/Content.astro";
|
||||
import type { Post } from "@/types";
|
||||
import { getPost, getPosts } from "@/utils/payload";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const posts = await getPosts();
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { Post } from "src/types";
|
||||
import type { Post } from "@/types";
|
||||
|
||||
const url = import.meta.env.DEV
|
||||
? "http://payload:3001"
|
||||
|
@ -2,6 +2,9 @@
|
||||
"extends": "astro/tsconfigs/strict",
|
||||
"compilerOptions": {
|
||||
"types": ["@astrojs/image/client"],
|
||||
"baseUrl": "."
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user