File tree Expand file tree Collapse file tree 3 files changed +18
-17
lines changed
Expand file tree Collapse file tree 3 files changed +18
-17
lines changed Original file line number Diff line number Diff line change 5959 env :
6060 CI : true
6161
62- - name : Debug - List built files
63- run : |
64- echo "=== Storybook static files ==="
65- find storybook-static -name "*.svg" | head -10
66- echo "=== Directory structure ==="
67- ls -la storybook-static/
68- echo "=== HTML content check ==="
69- grep -n "chevron-down" storybook-static/index.html || echo "chevron-down not found in index.html"
70- echo "=== Check if base path is set ==="
71- grep -n "DDD-12-GROWIT-FE" storybook-static/index.html || echo "Base path not found in HTML"
72-
7362 - name : Setup Pages
7463 uses : actions/configure-pages@v4
7564
Original file line number Diff line number Diff line change @@ -6,12 +6,6 @@ const config = {
66 name : '@storybook/nextjs' ,
77 options : { } ,
88 } ,
9- images : {
10- unoptimized : true ,
11- } ,
129 staticDirs : [ '../public' ] ,
13- ...( process . env . CI && {
14- base : '/DDD-12-GROWIT-FE/' ,
15- } ) ,
1610} ;
1711export default config ;
Original file line number Diff line number Diff line change 11import '../src/app/globals.css' ;
2+ import * as NextImage from 'next/image' ;
3+
4+ // Next.js Image 컴포넌트를 일반 img 태그로 대체
5+ const OriginalNextImage = NextImage . default ;
6+
7+ Object . defineProperty ( NextImage , 'default' , {
8+ configurable : true ,
9+ value : props => {
10+ if ( typeof props . src === 'string' ) {
11+ // GitHub Pages 배포시 base path 추가
12+ const basePath = process . env . NODE_ENV === 'production' ? '/DDD-12-GROWIT-FE' : '' ;
13+ const src = props . src . startsWith ( '/' ) ? `${ basePath } ${ props . src } ` : props . src ;
14+
15+ return < img { ...props } src = { src } alt = { props . alt || '' } /> ;
16+ }
17+ return < OriginalNextImage { ...props } /> ;
18+ } ,
19+ } ) ;
220
321export const parameters = {
422 actions : { argTypesRegex : '^on[A-Z].*' } ,
You can’t perform that action at this time.
0 commit comments