Skip to content

Commit 79c8276

Browse files
committed
fix css asset path for production build
1 parent aff441c commit 79c8276

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.storybook/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ const config = {
4444
);
4545

4646
if (iframeHtml) {
47+
const isProduction = configType === 'PRODUCTION';
48+
const basePath = isProduction ? '/common/firebird/dist/storybook' : '';
4749
iframeHtml.source = iframeHtml.source.replace(
4850
'</head>',
49-
` <link rel="stylesheet" href="/${cssChunk.fileName}">\n</head>`
51+
` <link rel="stylesheet" href="${basePath}/${cssChunk.fileName}">\n</head>`
5052
);
5153
}
5254
}

0 commit comments

Comments
 (0)