Skip to content

Commit 96db533

Browse files
committed
fix href link assets and stylesheets for oss.sufeni.id/carbon-react-native
1 parent f23949e commit 96db533

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

scripts/storybook-build.mjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,18 @@ htmlFile =
5454
)
5555
}
5656

57+
{
58+
// For oss.sufeni.id/carbon-react-native
59+
// fix all the assets and stylesheets href with forward slash
60+
61+
const hrefRegex = new RegExp(/\.\//g)
62+
63+
htmlFile =
64+
htmlFile.replace(
65+
hrefRegex,
66+
"./carbon-react-native/",
67+
)
68+
}
69+
5770
node_fs.promises.writeFile(htmlFilePath, htmlFile)
5871
node_fs.promises.writeFile(iframeHtmlFilePath, iframeHtmlFile)

0 commit comments

Comments
 (0)