Skip to content

Commit e779fed

Browse files
committed
fix: base url 수정
1 parent 88c7201 commit e779fed

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"lint:fix": "pnpm run -r lint:fix",
1414
"tsc": "pnpm run -r tsc",
1515
"prettier:write": "prettier --write ./packages/*/src",
16-
"preview": "vite preview",
16+
"preview": "pnpm -F @hanghae-plus/shopping preview",
1717
"test": "pnpm -F @hanghae-plus/lib test",
1818
"test:basic": "pnpm -F @hanghae-plus/lib test:basic",
1919
"test:advanced": "pnpm -F @hanghae-plus/lib test:advanced",

packages/app/src/components/PublicImage.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ import { BASE_URL } from "../constants";
22
import { type ComponentProps, memo } from "react";
33

44
export const PublicImage = memo(({ src, ...props }: ComponentProps<"img">) => {
5-
// URL을 이용해서 src와 BASE_URL을 결합
6-
// src: /images/logo.png
7-
// BASE_URL: /front_6th_chapter1-2/
85
const url = String(BASE_URL + src).replace("//", "/");
96

107
return <img src={url} {...props} />;

packages/app/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import react from "@vitejs/plugin-react-oxc";
22
import { createViteConfig } from "../../createViteConfig";
33

4-
const base: string = process.env.NODE_ENV === "production" ? "/front_6th_chapter1-2/" : "";
4+
const base: string = process.env.NODE_ENV === "production" ? "/front_6th_chapter1-3/" : "";
55

66
export default createViteConfig({
77
base,

0 commit comments

Comments
 (0)